OSDN Git Service

On configuration change setup screen decorations
authorBeverly <beverlyt@google.com>
Thu, 24 May 2018 13:25:45 +0000 (09:25 -0400)
committerBeverly <beverlyt@google.com>
Thu, 24 May 2018 14:58:00 +0000 (10:58 -0400)
Test: developer options > set emulated cutout
Change-Id: I6418ad8226955264d6197491d772954491aba9ac
Fixes: 80230317

packages/SystemUI/src/com/android/systemui/ScreenDecorations.java

index 2746a71..e347a14 100644 (file)
@@ -196,6 +196,9 @@ public class ScreenDecorations extends SystemUI implements Tunable {
     @Override
     protected void onConfigurationChanged(Configuration newConfig) {
         updateOrientation();
+        if (shouldDrawCutout() && mOverlay == null) {
+            setupDecorations();
+        }
     }
 
     protected void updateOrientation() {
@@ -207,10 +210,6 @@ public class ScreenDecorations extends SystemUI implements Tunable {
                 updateLayoutParams();
                 updateViews();
             }
-
-            if (shouldDrawCutout() && mOverlay == null) {
-                setupDecorations();
-            }
         }
     }