Loading libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java +2 −2 Original line number Diff line number Diff line Loading @@ -110,9 +110,9 @@ public class SplashscreenContentDrawer { @VisibleForTesting final ColorCache mColorCache; SplashscreenContentDrawer(Context context, TransactionPool pool) { SplashscreenContentDrawer(Context context, IconProvider iconProvider, TransactionPool pool) { mContext = context; mIconProvider = new IconProvider(context); mIconProvider = iconProvider; mTransactionPool = pool; // Initialize Splashscreen worker thread Loading libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java +3 −2 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ import android.window.TaskSnapshot; import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.launcher3.icons.IconProvider; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.TransactionPool; import com.android.wm.shell.common.annotations.ShellSplashscreenThread; Loading Loading @@ -123,11 +124,11 @@ public class StartingSurfaceDrawer { * @param splashScreenExecutor The thread used to control add and remove starting window. */ public StartingSurfaceDrawer(Context context, ShellExecutor splashScreenExecutor, TransactionPool pool) { IconProvider iconProvider, TransactionPool pool) { mContext = context; mDisplayManager = mContext.getSystemService(DisplayManager.class); mSplashScreenExecutor = splashScreenExecutor; mSplashscreenContentDrawer = new SplashscreenContentDrawer(mContext, pool); mSplashscreenContentDrawer = new SplashscreenContentDrawer(mContext, iconProvider, pool); mSplashScreenExecutor.execute(() -> mChoreographer = Choreographer.getInstance()); mWindowManagerGlobal = WindowManagerGlobal.getInstance(); mDisplayManager.getDisplay(DEFAULT_DISPLAY); Loading libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingWindowController.java +5 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import androidx.annotation.BinderThread; import com.android.internal.annotations.GuardedBy; import com.android.internal.util.function.TriConsumer; import com.android.launcher3.icons.IconProvider; import com.android.wm.shell.common.RemoteCallable; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.TransactionPool; Loading Loading @@ -85,9 +86,11 @@ public class StartingWindowController implements RemoteCallable<StartingWindowCo private final SparseIntArray mTaskBackgroundColors = new SparseIntArray(); public StartingWindowController(Context context, ShellExecutor splashScreenExecutor, StartingWindowTypeAlgorithm startingWindowTypeAlgorithm, TransactionPool pool) { StartingWindowTypeAlgorithm startingWindowTypeAlgorithm, IconProvider iconProvider, TransactionPool pool) { mContext = context; mStartingSurfaceDrawer = new StartingSurfaceDrawer(context, splashScreenExecutor, pool); mStartingSurfaceDrawer = new StartingSurfaceDrawer(context, splashScreenExecutor, iconProvider, pool); mStartingWindowTypeAlgorithm = startingWindowTypeAlgorithm; mSplashScreenExecutor = splashScreenExecutor; } Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawerTests.java +7 −3 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; import androidx.test.platform.app.InstrumentationRegistry; import com.android.launcher3.icons.IconProvider; import com.android.wm.shell.common.HandlerExecutor; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.TransactionPool; Loading @@ -93,6 +94,8 @@ public class StartingSurfaceDrawerTests { @Mock private WindowManager mMockWindowManager; @Mock private IconProvider mIconProvider; @Mock private TransactionPool mTransactionPool; private final Handler mTestHandler = new Handler(Looper.getMainLooper()); Loading @@ -105,8 +108,8 @@ public class StartingSurfaceDrawerTests { int mAddWindowForTask = 0; TestStartingSurfaceDrawer(Context context, ShellExecutor splashScreenExecutor, TransactionPool pool) { super(context, splashScreenExecutor, pool); IconProvider iconProvider, TransactionPool pool) { super(context, splashScreenExecutor, iconProvider, pool); } @Override Loading Loading @@ -156,7 +159,8 @@ public class StartingSurfaceDrawerTests { doNothing().when(mMockWindowManager).addView(any(), any()); mTestExecutor = new HandlerExecutor(mTestHandler); mStartingSurfaceDrawer = spy( new TestStartingSurfaceDrawer(mTestContext, mTestExecutor, mTransactionPool)); new TestStartingSurfaceDrawer(mTestContext, mTestExecutor, mIconProvider, mTransactionPool)); } @Test Loading packages/SystemUI/src/com/android/systemui/wmshell/WMShellBaseModule.java +10 −2 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.view.WindowManager; import com.android.internal.logging.UiEventLogger; import com.android.internal.statusbar.IStatusBarService; import com.android.launcher3.icons.IconProvider; import com.android.systemui.dagger.WMComponent; import com.android.systemui.dagger.WMSingleton; import com.android.wm.shell.RootTaskDisplayAreaOrganizer; Loading Loading @@ -166,6 +167,12 @@ public abstract class WMShellBaseModule { return new SystemWindows(displayController, wmService); } @WMSingleton @Provides static IconProvider provideIconProvider(Context context) { return new IconProvider(context); } // We currently dedupe multiple messages, so we use the shell main handler directly @WMSingleton @Provides Loading Loading @@ -486,9 +493,10 @@ public abstract class WMShellBaseModule { @Provides static StartingWindowController provideStartingWindowController(Context context, @ShellSplashscreenThread ShellExecutor splashScreenExecutor, StartingWindowTypeAlgorithm startingWindowTypeAlgorithm, TransactionPool pool) { StartingWindowTypeAlgorithm startingWindowTypeAlgorithm, IconProvider iconProvider, TransactionPool pool) { return new StartingWindowController(context, splashScreenExecutor, startingWindowTypeAlgorithm, pool); startingWindowTypeAlgorithm, iconProvider, pool); } // Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java +2 −2 Original line number Diff line number Diff line Loading @@ -110,9 +110,9 @@ public class SplashscreenContentDrawer { @VisibleForTesting final ColorCache mColorCache; SplashscreenContentDrawer(Context context, TransactionPool pool) { SplashscreenContentDrawer(Context context, IconProvider iconProvider, TransactionPool pool) { mContext = context; mIconProvider = new IconProvider(context); mIconProvider = iconProvider; mTransactionPool = pool; // Initialize Splashscreen worker thread Loading
libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java +3 −2 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ import android.window.TaskSnapshot; import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.launcher3.icons.IconProvider; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.TransactionPool; import com.android.wm.shell.common.annotations.ShellSplashscreenThread; Loading Loading @@ -123,11 +124,11 @@ public class StartingSurfaceDrawer { * @param splashScreenExecutor The thread used to control add and remove starting window. */ public StartingSurfaceDrawer(Context context, ShellExecutor splashScreenExecutor, TransactionPool pool) { IconProvider iconProvider, TransactionPool pool) { mContext = context; mDisplayManager = mContext.getSystemService(DisplayManager.class); mSplashScreenExecutor = splashScreenExecutor; mSplashscreenContentDrawer = new SplashscreenContentDrawer(mContext, pool); mSplashscreenContentDrawer = new SplashscreenContentDrawer(mContext, iconProvider, pool); mSplashScreenExecutor.execute(() -> mChoreographer = Choreographer.getInstance()); mWindowManagerGlobal = WindowManagerGlobal.getInstance(); mDisplayManager.getDisplay(DEFAULT_DISPLAY); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingWindowController.java +5 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import androidx.annotation.BinderThread; import com.android.internal.annotations.GuardedBy; import com.android.internal.util.function.TriConsumer; import com.android.launcher3.icons.IconProvider; import com.android.wm.shell.common.RemoteCallable; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.TransactionPool; Loading Loading @@ -85,9 +86,11 @@ public class StartingWindowController implements RemoteCallable<StartingWindowCo private final SparseIntArray mTaskBackgroundColors = new SparseIntArray(); public StartingWindowController(Context context, ShellExecutor splashScreenExecutor, StartingWindowTypeAlgorithm startingWindowTypeAlgorithm, TransactionPool pool) { StartingWindowTypeAlgorithm startingWindowTypeAlgorithm, IconProvider iconProvider, TransactionPool pool) { mContext = context; mStartingSurfaceDrawer = new StartingSurfaceDrawer(context, splashScreenExecutor, pool); mStartingSurfaceDrawer = new StartingSurfaceDrawer(context, splashScreenExecutor, iconProvider, pool); mStartingWindowTypeAlgorithm = startingWindowTypeAlgorithm; mSplashScreenExecutor = splashScreenExecutor; } Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawerTests.java +7 −3 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; import androidx.test.platform.app.InstrumentationRegistry; import com.android.launcher3.icons.IconProvider; import com.android.wm.shell.common.HandlerExecutor; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.TransactionPool; Loading @@ -93,6 +94,8 @@ public class StartingSurfaceDrawerTests { @Mock private WindowManager mMockWindowManager; @Mock private IconProvider mIconProvider; @Mock private TransactionPool mTransactionPool; private final Handler mTestHandler = new Handler(Looper.getMainLooper()); Loading @@ -105,8 +108,8 @@ public class StartingSurfaceDrawerTests { int mAddWindowForTask = 0; TestStartingSurfaceDrawer(Context context, ShellExecutor splashScreenExecutor, TransactionPool pool) { super(context, splashScreenExecutor, pool); IconProvider iconProvider, TransactionPool pool) { super(context, splashScreenExecutor, iconProvider, pool); } @Override Loading Loading @@ -156,7 +159,8 @@ public class StartingSurfaceDrawerTests { doNothing().when(mMockWindowManager).addView(any(), any()); mTestExecutor = new HandlerExecutor(mTestHandler); mStartingSurfaceDrawer = spy( new TestStartingSurfaceDrawer(mTestContext, mTestExecutor, mTransactionPool)); new TestStartingSurfaceDrawer(mTestContext, mTestExecutor, mIconProvider, mTransactionPool)); } @Test Loading
packages/SystemUI/src/com/android/systemui/wmshell/WMShellBaseModule.java +10 −2 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.view.WindowManager; import com.android.internal.logging.UiEventLogger; import com.android.internal.statusbar.IStatusBarService; import com.android.launcher3.icons.IconProvider; import com.android.systemui.dagger.WMComponent; import com.android.systemui.dagger.WMSingleton; import com.android.wm.shell.RootTaskDisplayAreaOrganizer; Loading Loading @@ -166,6 +167,12 @@ public abstract class WMShellBaseModule { return new SystemWindows(displayController, wmService); } @WMSingleton @Provides static IconProvider provideIconProvider(Context context) { return new IconProvider(context); } // We currently dedupe multiple messages, so we use the shell main handler directly @WMSingleton @Provides Loading Loading @@ -486,9 +493,10 @@ public abstract class WMShellBaseModule { @Provides static StartingWindowController provideStartingWindowController(Context context, @ShellSplashscreenThread ShellExecutor splashScreenExecutor, StartingWindowTypeAlgorithm startingWindowTypeAlgorithm, TransactionPool pool) { StartingWindowTypeAlgorithm startingWindowTypeAlgorithm, IconProvider iconProvider, TransactionPool pool) { return new StartingWindowController(context, splashScreenExecutor, startingWindowTypeAlgorithm, pool); startingWindowTypeAlgorithm, iconProvider, pool); } // Loading