diff options
| author | 2018-03-29 16:29:18 +0200 | |
|---|---|---|
| committer | 2018-04-04 13:22:14 +0000 | |
| commit | 752cd826b9991f0333ac4cfe7a8c3a9c60f0cbda (patch) | |
| tree | e537c85397c6a26e53ca53f90ce80a263a631047 | |
| parent | 0859b46d9d889a327d7c0d76cbe5b571ebb85ec0 (diff) | |
Only set client hidden if both hidden and hiddenRequested
This fixes a bug where clientHidden of Launcher was set to true
too early because of the following flow:
- Open app, then press home
- During the transition relaunch the app
This leads to a new transition being started for which
hiddenRequested=true for Launcher. Then, the old animation
finishes, before the new one gets stared, and Launcher gets client
hidden too early.
More generally this is correct because:
- if (hidden && hiddenRequested) both states agree
- if (!hidden && !hiddenRequested) both states agree as well
- if (hidden && !hiddenRequested): App is becoming visible before
transition has started, so we shouldn't set it to client hidden
- if (!hidden && hiddenRequested): App is becoming invisible before
transition has started. However we need to defer client hidden
until the transition is done.
Bug: 74220420
Test: Open/close apps quickly repeatedly
Test: go/wm-smoke
Change-Id: I6df107fb0be9d2d779c997f0ddf1315bf53d27a5
| -rw-r--r-- | services/core/java/com/android/server/wm/AppWindowToken.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java index f19c554ace97..8fa94fb4de6b 100644 --- a/services/core/java/com/android/server/wm/AppWindowToken.java +++ b/services/core/java/com/android/server/wm/AppWindowToken.java @@ -1887,7 +1887,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree "AppWindowToken"); clearThumbnail(); - setClientHidden(hiddenRequested); + setClientHidden(isHidden() && hiddenRequested); if (mService.mInputMethodTarget != null && mService.mInputMethodTarget.mAppToken == this) { getDisplayContent().computeImeTarget(true /* updateImeTarget */); |