summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lucas Dupin <dupin@google.com> 2020-04-15 21:52:12 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-04-15 21:52:12 +0000
commit2dbd18574d7737b5a61ce95525d938ce00a8505c (patch)
treeace6e4ca87354580d975508285854e275723b633
parent23e062deb5573c0d4462a5a6068d9da9cb60befd (diff)
parent46b55fe40fca231bcb0b5b04b0c01b34e54936d7 (diff)
Merge "Fix crash when changing display cutout" into rvc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/ScreenDecorations.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
index 922fb69b3fdc..7861211e802d 100644
--- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
+++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
@@ -948,7 +948,12 @@ public class ScreenDecorations extends SystemUI implements Tunable {
int dw = flipped ? lh : lw;
int dh = flipped ? lw : lh;
- mBoundingPath.set(DisplayCutout.pathFromResources(getResources(), dw, dh));
+ Path path = DisplayCutout.pathFromResources(getResources(), dw, dh);
+ if (path != null) {
+ mBoundingPath.set(path);
+ } else {
+ mBoundingPath.reset();
+ }
Matrix m = new Matrix();
transformPhysicalToLogicalCoordinates(mInfo.rotation, dw, dh, m);
mBoundingPath.transform(m);