summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Heemin Seog <hseog@google.com> 2020-12-03 09:48:33 -0800
committer Heemin Seog <hseog@google.com> 2021-01-21 19:04:09 +0000
commit344efe80a96ba804533f0fc7c17a02ee8ffaaf2d (patch)
tree48f2abb08081f1769a1305a1701096fece02b4c8
parent03b88671669fe8a9aeee407a4e3f4dff156f58ea (diff)
DO NOT MERGE Do not update bar control target when application is starting
Handling the bar control target even when the application is starting causes there to be a flicker in system bar visibility when switching from one immersive mode app to another immersive mode app. Bug: 149312861 Test: manual Change-Id: If5de2ff97d4ad177e5fc58baa82b3f43ed118c2e
-rw-r--r--services/core/java/com/android/server/wm/InsetsPolicy.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/InsetsPolicy.java b/services/core/java/com/android/server/wm/InsetsPolicy.java
index fd67db1d5cc9..a6a44a9f68e6 100644
--- a/services/core/java/com/android/server/wm/InsetsPolicy.java
+++ b/services/core/java/com/android/server/wm/InsetsPolicy.java
@@ -27,6 +27,7 @@ import static android.view.InsetsState.ITYPE_STATUS_BAR;
import static android.view.SyncRtSurfaceTransactionApplier.applyParams;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
import android.annotation.Nullable;
import android.app.StatusBarManager;
@@ -127,6 +128,9 @@ class InsetsPolicy {
/** Updates the target which can control system bars. */
void updateBarControlTarget(@Nullable WindowState focusedWin) {
+ if (focusedWin != null && (focusedWin.mAttrs.type == TYPE_APPLICATION_STARTING)) {
+ return;
+ }
if (mFocusedWin != focusedWin){
abortTransient();
}