diff options
| author | 2019-06-11 15:20:51 +0000 | |
|---|---|---|
| committer | 2019-06-11 15:20:51 +0000 | |
| commit | 94f7f39a01f243883e0786c351fbc72f5145bfbd (patch) | |
| tree | ef7b771df77763169d1047ad0a16797e6ce064f8 | |
| parent | 7ac45d97cf096182b7bc32e0ed68b7979efbc0ea (diff) | |
| parent | 7c88cf83035e331bb4c4ccb519c8200f2e9d083f (diff) | |
Merge "Prevent dismissing starting window when reopening app" into qt-dev
| -rw-r--r-- | services/core/java/com/android/server/wm/AppWindowToken.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java index 4a9a3f71f90e..60cfe14f4080 100644 --- a/services/core/java/com/android/server/wm/AppWindowToken.java +++ b/services/core/java/com/android/server/wm/AppWindowToken.java @@ -540,6 +540,14 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree // If the app was already visible, don't reset the waitingToShow state. if (isHidden()) { waitingToShow = true; + + // Let's reset the draw state in order to prevent the starting window to be + // immediately dismissed when the app still has the surface. + forAllWindows(w -> { + if (w.mAttrs.type != TYPE_APPLICATION_STARTING) { + w.mWinAnimator.resetDrawState(); + } + }, true /* traverseTopToBottom */); } } |