summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
index 3a3b05bdd71d..ddfc5626d7ab 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
@@ -2273,7 +2273,10 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
// applying the dimming effect twice.
mUiBgExecutor.execute(() -> {
float dimAmount = 0f;
- if (mWallpaperManager.lockScreenWallpaperExists()) {
+ // Note that access to WallpaperManager APIs should be guarded by a check into
+ // WallpaperManager#isWallpaperSupported. Form factors that do not use wallpaper
+ // may crash SysUI during improper access. ref: b/355307617
+ if (!mWallpaperSupported || mWallpaperManager.lockScreenWallpaperExists()) {
dimAmount = mWallpaperManager.getWallpaperDimAmount();
}
final float scrimDimAmount = dimAmount;