Inject member of AcitivityUi in onPreCreate
This commit is contained in:
parent
9761b6e31c
commit
92f40a9b6d
@ -135,7 +135,7 @@ public class ActivityUi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onPreCreate(@Nonnull Activity activity) {
|
public void onPreCreate(@Nonnull Activity activity) {
|
||||||
final SharedPreferences preferences = App.getPreferences();
|
cast(activity.getApplication()).getComponent().inject(this);
|
||||||
|
|
||||||
theme = Preferences.Gui.getTheme(preferences);
|
theme = Preferences.Gui.getTheme(preferences);
|
||||||
activity.setTheme(theme.getThemeFor(activity));
|
activity.setTheme(theme.getThemeFor(activity));
|
||||||
@ -145,8 +145,6 @@ public class ActivityUi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
cast(activity.getApplication()).getComponent().inject(this);
|
|
||||||
|
|
||||||
// let's disable locking of screen for monkeyrunner
|
// let's disable locking of screen for monkeyrunner
|
||||||
if (App.isMonkeyRunner(activity)) {
|
if (App.isMonkeyRunner(activity)) {
|
||||||
final KeyguardManager km = (KeyguardManager) activity.getSystemService(Context.KEYGUARD_SERVICE);
|
final KeyguardManager km = (KeyguardManager) activity.getSystemService(Context.KEYGUARD_SERVICE);
|
||||||
|
Loading…
Reference in New Issue
Block a user