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

Commit 8b1e1f92 authored by Felipe Leme's avatar Felipe Leme
Browse files

Don't set mLockscreenWallpaper when wallpaper is not supported.

Bug: 138939803
Bug: 144862300

Test: a CtsAppTestCases:android.app.cts.WallpaperManagerTest

Change-Id: Ibb5dd6097939a5b50244ee3cec5ee09a1f5417cb
(cherry picked from commit e8d7b883b4e30572cd1d6d9655394ef05be93621)
parent cb7d9067
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -343,6 +343,7 @@ public class StatusBar extends SystemUI implements DemoMode,
    private BiometricUnlockController mBiometricUnlockController;
    private final LightBarController mLightBarController;
    private final Lazy<LockscreenWallpaper> mLockscreenWallpaperLazy;
    @Nullable
    protected LockscreenWallpaper mLockscreenWallpaper;
    private final AutoHideController mAutoHideController;
    @Nullable
@@ -1055,7 +1056,7 @@ public class StatusBar extends SystemUI implements DemoMode,

        createNavigationBar(result);

        if (ENABLE_LOCKSCREEN_WALLPAPER) {
        if (ENABLE_LOCKSCREEN_WALLPAPER && mWallpaperSupported) {
            mLockscreenWallpaper = mLockscreenWallpaperLazy.get();
            mLockscreenWallpaper.setHandler(mHandler);
        }
@@ -2794,7 +2795,9 @@ public class StatusBar extends SystemUI implements DemoMode,

    @Override
    public void setLockscreenUser(int newUserId) {
        if (mLockscreenWallpaper != null) {
            mLockscreenWallpaper.setCurrentUser(newUserId);
        }
        mScrimController.setCurrentUser(newUserId);
        if (mWallpaperSupported) {
            mWallpaperChangedReceiver.onReceive(mContext, null);