diff options
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/SystemUIInitializer.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/SystemUIInitializer.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIInitializer.java b/packages/SystemUI/src/com/android/systemui/SystemUIInitializer.java index a21f45f701b3..0fc9ef96f6e9 100644 --- a/packages/SystemUI/src/com/android/systemui/SystemUIInitializer.java +++ b/packages/SystemUI/src/com/android/systemui/SystemUIInitializer.java @@ -22,6 +22,8 @@ import android.os.Handler; import android.os.HandlerThread; import android.util.Log; +import androidx.annotation.Nullable; + import com.android.systemui.dagger.GlobalRootComponent; import com.android.systemui.dagger.SysUIComponent; import com.android.systemui.dagger.WMComponent; @@ -53,6 +55,7 @@ public abstract class SystemUIInitializer { mContext = context; } + @Nullable protected abstract GlobalRootComponent.Builder getGlobalRootComponentBuilder(); /** @@ -69,6 +72,11 @@ public abstract class SystemUIInitializer { * Starts the initialization process. This stands up the Dagger graph. */ public void init(boolean fromTest) throws ExecutionException, InterruptedException { + GlobalRootComponent.Builder globalBuilder = getGlobalRootComponentBuilder(); + if (globalBuilder == null) { + return; + } + mRootComponent = getGlobalRootComponentBuilder() .context(mContext) .instrumentationTest(fromTest) @@ -97,7 +105,6 @@ public abstract class SystemUIInitializer { .setDisplayAreaHelper(mWMComponent.getDisplayAreaHelper()) .setRecentTasks(mWMComponent.getRecentTasks()) .setBackAnimation(mWMComponent.getBackAnimation()) - .setFloatingTasks(mWMComponent.getFloatingTasks()) .setDesktopMode(mWMComponent.getDesktopMode()); // Only initialize when not starting from tests since this currently initializes some @@ -118,9 +125,9 @@ public abstract class SystemUIInitializer { .setStartingSurface(Optional.ofNullable(null)) .setRecentTasks(Optional.ofNullable(null)) .setBackAnimation(Optional.ofNullable(null)) - .setFloatingTasks(Optional.ofNullable(null)) .setDesktopMode(Optional.ofNullable(null)); } + mSysUIComponent = builder.build(); if (initializeComponents) { mSysUIComponent.init(); |