From 289347aedf2c1494cb3f3f741e9b7eece5fa0e3a Mon Sep 17 00:00:00 2001 From: Jerry Chang Date: Mon, 18 Oct 2021 08:55:36 +0000 Subject: [PATCH] Revert "Provide IconProvider in sysui dagger" This reverts commit f59eccd4a65bd98435e4d180d834dd9d07803bdc. Reason for revert: b/203356785, missed to update CarLauncher correspondingly in sc-v2 Change-Id: I0902b496b69e415fa0208948307fdf3883a1be17 --- .../startingsurface/SplashscreenContentDrawer.java | 4 ++-- .../shell/startingsurface/StartingSurfaceDrawer.java | 5 ++--- .../startingsurface/StartingWindowController.java | 7 ++----- .../startingsurface/StartingSurfaceDrawerTests.java | 10 +++------- .../android/systemui/wmshell/WMShellBaseModule.java | 12 ++---------- 5 files changed, 11 insertions(+), 27 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java index b191cabcf6aa7..8df7cbb278071 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java @@ -110,9 +110,9 @@ public class SplashscreenContentDrawer { @VisibleForTesting final ColorCache mColorCache; - SplashscreenContentDrawer(Context context, IconProvider iconProvider, TransactionPool pool) { + SplashscreenContentDrawer(Context context, TransactionPool pool) { mContext = context; - mIconProvider = iconProvider; + mIconProvider = new IconProvider(context); mTransactionPool = pool; // Initialize Splashscreen worker thread diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java index bd4869670bec2..979bf0056b72b 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java @@ -61,7 +61,6 @@ 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; @@ -124,11 +123,11 @@ public class StartingSurfaceDrawer { * @param splashScreenExecutor The thread used to control add and remove starting window. */ public StartingSurfaceDrawer(Context context, ShellExecutor splashScreenExecutor, - IconProvider iconProvider, TransactionPool pool) { + TransactionPool pool) { mContext = context; mDisplayManager = mContext.getSystemService(DisplayManager.class); mSplashScreenExecutor = splashScreenExecutor; - mSplashscreenContentDrawer = new SplashscreenContentDrawer(mContext, iconProvider, pool); + mSplashscreenContentDrawer = new SplashscreenContentDrawer(mContext, pool); mSplashScreenExecutor.execute(() -> mChoreographer = Choreographer.getInstance()); mWindowManagerGlobal = WindowManagerGlobal.getInstance(); mDisplayManager.getDisplay(DEFAULT_DISPLAY); diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingWindowController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingWindowController.java index a86e07a5602df..99644f9493d2c 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingWindowController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingWindowController.java @@ -43,7 +43,6 @@ 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; @@ -86,11 +85,9 @@ public class StartingWindowController implements RemoteCallable