summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Bill Lin <lbill@google.com> 2020-03-17 19:06:51 +0800
committer Bill Lin <lbill@google.com> 2020-03-18 16:42:54 +0800
commit173f30edefdc5a025fcefa0b265bb2b9841bae99 (patch)
treec152f9e4b7fe5743207607757e04ed9830b9d10d
parent8888ec9144a5a79e8e877fb19cbbe6cc3cc4dc76 (diff)
Add NPE check in CameraTransitionCallback
CameraManager.AvailabilityCallback will notifyCameraInactive() at initial stage, and cause NPE when mCutoutViews is NULL Initialize mCutoutView at early stage Bug: 151706640 Test: manual boot device Test atest SystemUITests Change-Id: I2008342d15bb589f85bb99fcc35ede96ef9678bd
-rw-r--r--packages/SystemUI/src/com/android/systemui/ScreenDecorations.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
index a8a3caecc780..5f004a631e46 100644
--- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
+++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
@@ -122,7 +122,7 @@ public class ScreenDecorations extends SystemUI implements Tunable {
protected int mRoundedDefaultBottom;
@VisibleForTesting
protected View[] mOverlays;
- private DisplayCutoutView[] mCutoutViews;
+ private DisplayCutoutView[] mCutoutViews = new DisplayCutoutView[BOUNDS_POSITION_LENGTH];
private float mDensity;
private WindowManager mWindowManager;
private int mRotation;