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

Commit 91274b91 authored by Dave Mankoff's avatar Dave Mankoff
Browse files

1/N: Rename SysuiRootComponent to GlobalRootComponent

This is the first step in establishing separate subcomponents for
WindowManager and SysUI within the SysUI process.

Bug: 162923491
Test: manual
Change-Id: I54269e853de92b622d63186e43042780d8ef1d4b
parent 522be5a2
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -18,9 +18,9 @@ package com.android.systemui;

import com.android.systemui.dagger.DependencyBinder;
import com.android.systemui.dagger.DependencyProvider;
import com.android.systemui.dagger.GlobalRootComponent;
import com.android.systemui.dagger.SystemServicesModule;
import com.android.systemui.dagger.SystemUIModule;
import com.android.systemui.dagger.SystemUIRootComponent;
import com.android.systemui.onehanded.dagger.OneHandedModule;
import com.android.systemui.pip.phone.dagger.PipModule;

@@ -28,6 +28,7 @@ import javax.inject.Singleton;

import dagger.Component;

/** Car subclass for GlobalRootComponent. */
@Singleton
@Component(
        modules = {
@@ -41,12 +42,12 @@ import dagger.Component;
                CarSystemUIModule.class,
                CarSystemUIBinder.class
        })
public interface CarSystemUIRootComponent extends SystemUIRootComponent {
public interface CarGlobalRootComponent extends GlobalRootComponent {
    /**
     * Builder for a CarSystemUIRootComponent.
     * Builder for a CarGlobalRootComponent.
     */
    @Component.Builder
    interface Builder extends SystemUIRootComponent.Builder {
        CarSystemUIRootComponent build();
    interface Builder extends GlobalRootComponent.Builder {
        CarGlobalRootComponent build();
    }
}
+3 −3
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ package com.android.systemui;
import android.content.Context;
import android.content.res.Resources;

import com.android.systemui.dagger.SystemUIRootComponent;
import com.android.systemui.dagger.GlobalRootComponent;

import java.util.HashSet;
import java.util.Set;
@@ -30,8 +30,8 @@ import java.util.Set;
public class CarSystemUIFactory extends SystemUIFactory {

    @Override
    protected SystemUIRootComponent buildSystemUIRootComponent(Context context) {
        return DaggerCarSystemUIRootComponent.builder()
    protected GlobalRootComponent buildGlobalRootComponent(Context context) {
        return DaggerCarGlobalRootComponent.builder()
                .context(context)
                .build();
    }
+3 −3
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ import com.android.systemui.car.keyguard.CarKeyguardViewController;
import com.android.systemui.car.statusbar.DozeServiceHost;
import com.android.systemui.car.statusbar.DummyNotificationShadeWindowController;
import com.android.systemui.car.volume.CarVolumeDialogComponent;
import com.android.systemui.dagger.SystemUIRootComponent;
import com.android.systemui.dagger.GlobalRootComponent;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dock.DockManager;
@@ -188,8 +188,8 @@ public abstract class CarSystemUIModule {
    abstract ShadeController provideShadeController(ShadeControllerImpl shadeController);

    @Binds
    abstract SystemUIRootComponent bindSystemUIRootComponent(
            CarSystemUIRootComponent systemUIRootComponent);
    abstract GlobalRootComponent bindGlobalRootComponent(
            CarGlobalRootComponent globalRootComponent);

    @Binds
    abstract VolumeDialogComponent bindVolumeDialogComponent(
+2 −2
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ import android.util.Log;
import android.util.TimingsTraceLog;

import com.android.systemui.dagger.ContextComponentHelper;
import com.android.systemui.dagger.SystemUIRootComponent;
import com.android.systemui.dagger.GlobalRootComponent;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.util.NotificationChannels;

@@ -57,7 +57,7 @@ public class SystemUIApplication extends Application implements
    private SystemUI[] mServices;
    private boolean mServicesStarted;
    private SystemUIAppComponentFactory.ContextAvailableCallback mContextAvailableCallback;
    private SystemUIRootComponent mRootComponent;
    private GlobalRootComponent mRootComponent;

    public SystemUIApplication() {
        super();
+7 −7
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@ import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.ViewMediatorCallback;
import com.android.systemui.bubbles.BubbleController;
import com.android.systemui.dagger.DaggerSystemUIRootComponent;
import com.android.systemui.dagger.SystemUIRootComponent;
import com.android.systemui.dagger.DaggerGlobalRootComponent;
import com.android.systemui.dagger.GlobalRootComponent;
import com.android.systemui.keyguard.DismissCallbackRegistry;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
@@ -53,7 +53,7 @@ public class SystemUIFactory {
    private static final String TAG = "SystemUIFactory";

    static SystemUIFactory mFactory;
    private SystemUIRootComponent mRootComponent;
    private GlobalRootComponent mRootComponent;

    public static <T extends SystemUIFactory> T getInstance() {
        return (T) mFactory;
@@ -88,7 +88,7 @@ public class SystemUIFactory {
    public SystemUIFactory() {}

    private void init(Context context) {
        mRootComponent = buildSystemUIRootComponent(context);
        mRootComponent = buildGlobalRootComponent(context);

        // Every other part of our codebase currently relies on Dependency, so we
        // really need to ensure the Dependency gets initialized early on.
@@ -96,13 +96,13 @@ public class SystemUIFactory {
        dependency.start();
    }

    protected SystemUIRootComponent buildSystemUIRootComponent(Context context) {
        return DaggerSystemUIRootComponent.builder()
    protected GlobalRootComponent buildGlobalRootComponent(Context context) {
        return DaggerGlobalRootComponent.builder()
                .context(context)
                .build();
    }

    public SystemUIRootComponent getRootComponent() {
    public GlobalRootComponent getRootComponent() {
        return mRootComponent;
    }

Loading