diff options
| author | 2020-04-15 21:52:12 +0000 | |
|---|---|---|
| committer | 2020-04-15 21:52:12 +0000 | |
| commit | 2dbd18574d7737b5a61ce95525d938ce00a8505c (patch) | |
| tree | ace6e4ca87354580d975508285854e275723b633 | |
| parent | 23e062deb5573c0d4462a5a6068d9da9cb60befd (diff) | |
| parent | 46b55fe40fca231bcb0b5b04b0c01b34e54936d7 (diff) | |
Merge "Fix crash when changing display cutout" into rvc-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/ScreenDecorations.java | 7 |
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); |