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

Commit 0153f0fb authored by Lucas Dupin's avatar Lucas Dupin Committed by Automerger Merge Worker
Browse files

Merge "Do not post color event, run it directly" into sc-dev am: 79267151 am: 1cd707af

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14925937

Change-Id: If32a47d7d60ff0379c7c074366a1c30cfcc048b2
parents 367b7d86 1cd707af
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -334,17 +334,22 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
        Runnable updateColors = () -> {
            WallpaperColors systemColor = mWallpaperManager.getWallpaperColors(
                    getLatestWallpaperType());
            mMainExecutor.execute(() -> {
            Runnable applyColors = () -> {
                if (DEBUG) Log.d(TAG, "Boot colors: " + systemColor);
                mCurrentColors = systemColor;
                reevaluateSystemTheme(false /* forceReload */);
            });
            };
            if (mDeviceProvisionedController.isCurrentUserSetup()) {
                mMainExecutor.execute(applyColors);
            } else {
                applyColors.run();
            }
        };

        // Whenever we're going directly to setup wizard, we need to process colors synchronously,
        // otherwise we'll see some jank when the activity is recreated.
        if (!mDeviceProvisionedController.isCurrentUserSetup()) {
            mMainExecutor.execute(updateColors);
            updateColors.run();
        } else {
            mBgExecutor.execute(updateColors);
        }