Fix crash from previewing launcher with unknown wallpaper colors.
Test: Open wallpaper app with live wallpaper applied should not crash. Fix: 195246865 Change-Id: Id64de32b35aa7a553daa752438060d7f6822bec8
This commit is contained in:
parent
25399db1e7
commit
dafa5040ef
|
@ -268,8 +268,8 @@ public class LauncherPreviewRenderer extends ContextWrapper
|
|||
WallpaperColors wallpaperColors = wallpaperColorsOverride != null
|
||||
? wallpaperColorsOverride
|
||||
: WallpaperManager.getInstance(context).getWallpaperColors(FLAG_SYSTEM);
|
||||
mWallpaperColorResources = LocalColorExtractor.newInstance(context)
|
||||
.generateColorsOverride(wallpaperColors);
|
||||
mWallpaperColorResources = wallpaperColors != null ? LocalColorExtractor.newInstance(
|
||||
context).generateColorsOverride(wallpaperColors) : null;
|
||||
} else {
|
||||
mWallpaperColorResources = null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue