OSDN Git Service

[WindowManager] Perform relayout after hiding-window animation
authorTetsutoki Shiozawa <tetsutoki.shiozawa@sony.com>
Fri, 18 May 2018 01:55:01 +0000 (10:55 +0900)
committerJorim Jaggi <jjaggi@google.com>
Tue, 22 May 2018 15:09:16 +0000 (17:09 +0200)
Symptom:
If navibar has been hidden by SYSTEM_UI_FLAG_HIDE_NAVIGATION flag,
it's hard to be shown again. Even though you perform a swipe-from-bottom
gesture, the navibar is not shown.

Root cause:
NavigationBar transition status is not updated. BarController waits for
the next hiding event but it's not notified. And then, BarController
gets a showing request before the previous hiding request is completed.
BarController loses the right transition status.

Solution:
Perform layout after hiding-window animation even if the window does
not have a focus. Relayout makes a chance to BarController to check
whether the navibar is completely hidden or not.

Bug: 80064019
Change-Id: I4c9511643992ea2db250c1deaf18c8d94cc5b61f

services/core/java/com/android/server/wm/WindowState.java

index dac85b3..c797d8d 100644 (file)
@@ -2298,8 +2298,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
                     if (DEBUG_FOCUS_LIGHT) Slog.i(TAG,
                             "setAnimationLocked: setting mFocusMayChange true");
                     mService.mFocusMayChange = true;
-                    setDisplayLayoutNeeded();
                 }
+                setDisplayLayoutNeeded();
                 // Window is no longer visible -- make sure if we were waiting
                 // for it to be displayed before enabling the display, that
                 // we allow the display to be enabled now.