Fix WallpaperManagerInternal NPE
Some targets don't have a WallpaperManager, thus this null check is necessary to avoid crashes. A crash was detected in Android auto emulator. Fixes: 280883891 Test: build completed successfully Change-Id: Ie475e9ba1999f109572252303e4103e5f977b4bd
This commit is contained in:
@@ -3555,7 +3555,10 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
mRootWindowContainer.forAllDisplays(displayContent -> {
|
||||
mKeyguardController.keyguardGoingAway(displayContent.getDisplayId(), flags);
|
||||
});
|
||||
getWallpaperManagerInternal().onKeyguardGoingAway();
|
||||
WallpaperManagerInternal wallpaperManagerInternal = getWallpaperManagerInternal();
|
||||
if (wallpaperManagerInternal != null) {
|
||||
wallpaperManagerInternal.onKeyguardGoingAway();
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
|
||||
Reference in New Issue
Block a user