From 03eb8862a7b370287f0fab73e9702027c44d9d69 Mon Sep 17 00:00:00 2001 From: Adithya R Date: Thu, 4 Mar 2021 18:12:20 +0530 Subject: [PATCH] SystemUI: Redraw display cutout on overlay changes Fixes notch hide overlay on some devices commit 5481d59996b34cda1cb6b680af7510fee7b53b42 Author: daniml3 Date: Tue Mar 9 08:11:13 2021 +0100 SystemUI: check if the cutout views array is null before using it Signed-off-by: daniml3 Change-Id: I1316c61280dadc30a86f2ae72559437a61dd4616 Co-authored-by: daniml3 Change-Id: I5a049099ab375833f1e5ebbda49dc36c3c0b0a68 --- .../src/com/android/systemui/ScreenDecorations.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java index 5d0a5e2debb7..26bf79ea4cf8 100644 --- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java @@ -986,6 +986,13 @@ public void onConfigurationChanged(Configuration newConfig) { updateConfiguration(); if (DEBUG) Log.i(TAG, "onConfigChanged from rot " + oldRotation + " to " + mRotation); setupDecorations(); + if (mCutoutViews != null) { + for (DisplayCutoutView dcv : mCutoutViews) { + if (dcv != null) { + dcv.updateCutout(); + } + } + } if (mOverlays != null) { // Updating the layout params ensures that ViewRootImpl will call relayoutWindow(), // which ensures that the forced seamless rotation will end, even if we updated