Merge "Don't set mLockscreenWallpaper when wallpaper is not supported." into qt-qpr1-dev

This commit is contained in:
TreeHugger Robot
2019-12-10 19:00:31 +00:00
committed by Android (Google) Code Review

View File

@@ -344,6 +344,7 @@ public class StatusBar extends SystemUI implements DemoMode,
private boolean mBrightnessMirrorVisible; private boolean mBrightnessMirrorVisible;
protected BiometricUnlockController mBiometricUnlockController; protected BiometricUnlockController mBiometricUnlockController;
protected LightBarController mLightBarController; protected LightBarController mLightBarController;
@Nullable
protected LockscreenWallpaper mLockscreenWallpaper; protected LockscreenWallpaper mLockscreenWallpaper;
@VisibleForTesting @VisibleForTesting
protected AutoHideController mAutoHideController; protected AutoHideController mAutoHideController;
@@ -891,7 +892,7 @@ public class StatusBar extends SystemUI implements DemoMode,
createNavigationBar(result); createNavigationBar(result);
if (ENABLE_LOCKSCREEN_WALLPAPER) { if (ENABLE_LOCKSCREEN_WALLPAPER && mWallpaperSupported) {
mLockscreenWallpaper = new LockscreenWallpaper(mContext, this, mHandler); mLockscreenWallpaper = new LockscreenWallpaper(mContext, this, mHandler);
} }
@@ -2748,7 +2749,9 @@ public class StatusBar extends SystemUI implements DemoMode,
@Override @Override
public void setLockscreenUser(int newUserId) { public void setLockscreenUser(int newUserId) {
mLockscreenWallpaper.setCurrentUser(newUserId); if (mLockscreenWallpaper != null) {
mLockscreenWallpaper.setCurrentUser(newUserId);
}
mScrimController.setCurrentUser(newUserId); mScrimController.setCurrentUser(newUserId);
if (mWallpaperSupported) { if (mWallpaperSupported) {
mWallpaperChangedReceiver.onReceive(mContext, null); mWallpaperChangedReceiver.onReceive(mContext, null);