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

Commit 0c29bafa authored by Evan Laird's avatar Evan Laird
Browse files

Fix lockscreen wallpapers

NotificationMediaManager was no longer properly setup in StatusBar by
being given null pointers in lieu if actual objects.

Change-Id: I0eec1ff4bebb6fce83ec5d015c377af13b817c17
Fixes: 118359320
Test: set lockscreen wallpaper
parent f887be23
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -525,16 +525,18 @@ public class NotificationMediaManager implements Dumpable {
    }

    public void setup(BackDropView backdrop, ImageView backdropFront, ImageView backdropBack,
            BiometricUnlockController biometricUnlockController, ScrimController scrimController,
            LockscreenWallpaper lockscreenWallpaper) {
            ScrimController scrimController, LockscreenWallpaper lockscreenWallpaper) {
        mBackdrop = backdrop;
        mBackdropFront = backdropFront;
        mBackdropBack = backdropBack;
        mBiometricUnlockController = biometricUnlockController;
        mScrimController = scrimController;
        mLockscreenWallpaper = lockscreenWallpaper;
    }

    public void setBiometricUnlockController(BiometricUnlockController biometricUnlockController) {
        mBiometricUnlockController = biometricUnlockController;
    }

    /**
     * Hide the album artwork that is fading out and release its bitmap.
     */
+7 −6
Original line number Diff line number Diff line
@@ -823,12 +823,6 @@ public class StatusBar extends SystemUI implements DemoMode,
            mLockscreenWallpaper = new LockscreenWallpaper(mContext, this, mHandler);
        }

        mBackdrop = mStatusBarWindow.findViewById(R.id.backdrop);
        mBackdropFront = mBackdrop.findViewById(R.id.backdrop_front);
        mBackdropBack = mBackdrop.findViewById(R.id.backdrop_back);
        mMediaManager.setup(mBackdrop, mBackdropFront, mBackdropBack, mBiometricUnlockController,
                mScrimController, mLockscreenWallpaper);

        mKeyguardIndicationController =
                SystemUIFactory.getInstance().createKeyguardIndicationController(mContext,
                        mStatusBarWindow.findViewById(R.id.keyguard_indication_area),
@@ -876,6 +870,12 @@ public class StatusBar extends SystemUI implements DemoMode,
        mDozeScrimController = new DozeScrimController(mScrimController, context,
                DozeParameters.getInstance(context));

        mBackdrop = mStatusBarWindow.findViewById(R.id.backdrop);
        mBackdropFront = mBackdrop.findViewById(R.id.backdrop_front);
        mBackdropBack = mBackdrop.findViewById(R.id.backdrop_back);
        mMediaManager.setup(mBackdrop, mBackdropFront, mBackdropBack,
                mScrimController, mLockscreenWallpaper);

        // Other icons
        mVolumeComponent = getComponent(VolumeComponent.class);

@@ -1120,6 +1120,7 @@ public class StatusBar extends SystemUI implements DemoMode,

        mKeyguardViewMediatorCallback = keyguardViewMediator.getViewMediatorCallback();
        mLightBarController.setBiometricUnlockController(mBiometricUnlockController);
        mMediaManager.setBiometricUnlockController(mBiometricUnlockController);
        Dependency.get(KeyguardDismissUtil.class).setDismissHandler(this::executeWhenUnlocked);
        Trace.endSection();
    }