From 195f46f565e89ea03f9489c310a89faf865e0697 Mon Sep 17 00:00:00 2001 From: Riddle Hsu Date: Thu, 8 Sep 2022 14:43:47 +0800 Subject: [PATCH] Always allow to trigger config change if decor insets change This is restoring to previous behavior. The timing to send config change when booting may slightly affect the gpu memory usage of SystemUI. E.g. guess the usage may be a bit less if the config change arrives before it has drawn. And DisplayContent#sendNewConfiguration() has already checked isReady(), so it is fine to let caller invoke directly. Bug: 245170265 Test: android.platform.test.scenario.sleep.Idle Change-Id: I7954925775e98171563ccad16b6999c17ece173c --- services/core/java/com/android/server/wm/DisplayPolicy.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index fe7cb1935f7ad..1636d9f76c1ca 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -2184,9 +2184,7 @@ public class DisplayPolicy { } mDecorInsets.invalidate(); mDecorInsets.mInfoForRotation[rotation].set(newInfo); - // If the device is booting, let the boot procedure trigger the new configuration. - // Otherwise the display configuration needs to be recomputed now. - return mService.mDisplayEnabled; + return true; } DecorInsets.Info getDecorInsetsInfo(int rotation, int w, int h) {