Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11d07a8b authored by Dave Mankoff's avatar Dave Mankoff Committed by Android (Google) Code Review
Browse files

Merge "Remove Dependency.get(InitController.class)"

parents 8142ee3e 71fca1a8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.ViewMediatorCallback;
import com.android.systemui.BatteryMeterView;
import com.android.systemui.Dependency;
import com.android.systemui.InitController;
import com.android.systemui.Prefs;
import com.android.systemui.R;
import com.android.systemui.assist.AssistManager;
@@ -319,6 +320,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
            ShadeController shadeController,
            StatusBarKeyguardViewManager statusBarKeyguardViewManager,
            ViewMediatorCallback viewMediatorCallback,
            InitController initController,
            DismissCallbackRegistry dismissCallbackRegistry,
            /* Car Settings injected components. */
            CarServiceProvider carServiceProvider,
@@ -399,6 +401,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
                superStatusBarViewFactory,
                statusBarKeyguardViewManager,
                viewMediatorCallback,
                initController,
                dismissCallbackRegistry);
        mScrimController = scrimController;
        mLockscreenLockIconController = lockscreenLockIconController;
+3 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.util.DisplayMetrics;
import com.android.internal.logging.MetricsLogger;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.ViewMediatorCallback;
import com.android.systemui.InitController;
import com.android.systemui.assist.AssistManager;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.bubbles.BubbleController;
@@ -189,6 +190,7 @@ public class CarStatusBarModule {
            ShadeController shadeController,
            StatusBarKeyguardViewManager statusBarKeyguardViewManager,
            ViewMediatorCallback viewMediatorCallback,
            InitController initController,
            DismissCallbackRegistry dismissCallbackRegistry,
            CarServiceProvider carServiceProvider,
            Lazy<PowerManagerHelper> powerManagerHelperLazy,
@@ -267,6 +269,7 @@ public class CarStatusBarModule {
                shadeController,
                statusBarKeyguardViewManager,
                viewMediatorCallback,
                initController,
                dismissCallbackRegistry,
                carServiceProvider,
                powerManagerHelperLazy,
+0 −3
Original line number Diff line number Diff line
@@ -267,7 +267,6 @@ public class Dependency {
    @Inject Lazy<KeyguardEnvironment> mKeyguardEnvironment;
    @Inject Lazy<ShadeController> mShadeController;
    @Inject Lazy<NotificationRemoteInputManager.Callback> mNotificationRemoteInputManagerCallback;
    @Inject Lazy<InitController> mInitController;
    @Inject Lazy<AppOpsController> mAppOpsController;
    @Inject Lazy<NavigationBarController> mNavigationBarController;
    @Inject Lazy<StatusBarStateController> mStatusBarStateController;
@@ -456,8 +455,6 @@ public class Dependency {
        mProviders.put(NotificationRemoteInputManager.Callback.class,
                mNotificationRemoteInputManagerCallback::get);

        mProviders.put(InitController.class, mInitController::get);

        mProviders.put(AppOpsController.class, mAppOpsController::get);

        mProviders.put(NavigationBarController.class, mNavigationBarController::get);
+6 −9
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ public class SystemUIApplication extends Application implements
    private SystemUI[] mServices;
    private boolean mServicesStarted;
    private SystemUIAppComponentFactory.ContextAvailableCallback mContextAvailableCallback;
    private SystemUIRootComponent mRootComponent;

    public SystemUIApplication() {
        super();
@@ -72,9 +73,9 @@ public class SystemUIApplication extends Application implements
                Trace.TRACE_TAG_APP);
        log.traceBegin("DependencyInjection");
        mContextAvailableCallback.onContextAvailable(this);
        SystemUIRootComponent root = SystemUIFactory.getInstance().getRootComponent();
        mComponentHelper = root.getContextComponentHelper();
        mBootCompleteCache = root.provideBootCacheImpl();
        mRootComponent = SystemUIFactory.getInstance().getRootComponent();
        mComponentHelper = mRootComponent.getContextComponentHelper();
        mBootCompleteCache = mRootComponent.provideBootCacheImpl();
        log.traceEnd();

        // Set the application theme that is inherited by all services. Note that setting the
@@ -209,7 +210,7 @@ public class SystemUIApplication extends Application implements
                mServices[i].onBootCompleted();
            }
        }
        Dependency.get(InitController.class).executePostInitTasks();
        mRootComponent.getInitController().executePostInitTasks();
        log.traceEnd();

        mServicesStarted = true;
@@ -218,11 +219,7 @@ public class SystemUIApplication extends Application implements
    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        if (mServicesStarted) {
            SystemUIFactory
                    .getInstance()
                    .getRootComponent()
                    .getConfigurationController()
                    .onConfigurationChanged(newConfig);
            mRootComponent.getConfigurationController().onConfigurationChanged(newConfig);
            int len = mServices.length;
            for (int i = 0; i < len; i++) {
                if (mServices[i] != null) {
+8 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.ContentProvider;

import com.android.systemui.BootCompleteCacheImpl;
import com.android.systemui.Dependency;
import com.android.systemui.InitController;
import com.android.systemui.SystemUIAppComponentFactory;
import com.android.systemui.SystemUIFactory;
import com.android.systemui.fragments.FragmentService;
@@ -77,6 +78,13 @@ public interface SystemUIRootComponent {
    @Singleton
    FragmentService.FragmentCreator createFragmentCreator();


    /**
     * Creates a InitController.
     */
    @Singleton
    InitController getInitController();

    /**
     * ViewCreator generates all Views that need injection.
     */
Loading