diff options
| author | 2020-03-17 19:06:51 +0800 | |
|---|---|---|
| committer | 2020-03-18 16:42:54 +0800 | |
| commit | 173f30edefdc5a025fcefa0b265bb2b9841bae99 (patch) | |
| tree | c152f9e4b7fe5743207607757e04ed9830b9d10d | |
| parent | 8888ec9144a5a79e8e877fb19cbbe6cc3cc4dc76 (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.java | 2 |
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; |