Skip to content

Commit 3f99fde

Browse files
author
Craig Mautner
committed
Clear sendingToBottom when animation is complete.
Was counting on moving the app to the top to clear the flag indicating that the app was being sent to the bottom. Since this did not always happen the sendingToBottom flag was occasionally left set. In this case the focus was skipped for that app and consequently input was never propagated to it. This fix clears the sendingToBottom flag each time the app animations are completed. Fixes bug 6691421. Change-Id: I6f851dc5bedca95182db8490d87c876a71ad5fde
1 parent 5bb835a commit 3f99fde

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8257,6 +8257,9 @@ private int handleAnimatingStoppedAndTransitionLocked() {
82578257

82588258
mAppTransitionRunning = false;
82598259
// Restore window app tokens to the ActivityManager views
8260+
for (int i = mAnimatingAppTokens.size() - 1; i >= 0; i--) {
8261+
mAnimatingAppTokens.get(i).sendingToBottom = false;
8262+
}
82608263
mAnimatingAppTokens.clear();
82618264
mAnimatingAppTokens.addAll(mAppTokens);
82628265
rebuildAppWindowListLocked();
@@ -9120,6 +9123,8 @@ private WindowState computeFocusedWindowLocked() {
91209123

91219124
// If this window's application has been removed, just skip it.
91229125
if (thisApp != null && (thisApp.removed || thisApp.sendingToBottom)) {
9126+
if (DEBUG_FOCUS) Slog.v(TAG, "Skipping app because " + (thisApp.removed
9127+
? "removed" : "sendingToBottom"));
91239128
continue;
91249129
}
91259130

0 commit comments

Comments
 (0)