diff options
| author | 2009-11-05 18:51:16 -0800 | |
|---|---|---|
| committer | 2009-11-05 19:13:18 -0800 | |
| commit | c9568e3989f1491abaa7960eca986af12743cb05 (patch) | |
| tree | 800863fce79d48838d0bb24942ddd96583525dd2 | |
| parent | 1d5b3a631cfcbfd2ea264f29a11a1366a16593b0 (diff) | |
When tasks are moved to top or bottom, the app tokens are being rearranged.
The window token rearrangement is defered if an animation is
underway. Force a focus recomputation when the window tokens are finally
rearranged so that we have a valid focused window.
| -rw-r--r-- | services/java/com/android/server/WindowManagerService.java | 4 | ||||
| -rw-r--r-- | services/java/com/android/server/am/ActivityManagerService.java | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index 94667ebbac3e..d3645c35ffa5 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -9629,6 +9629,10 @@ public class WindowManagerService extends IWindowManager.Stub moveInputMethodWindowsIfNeededLocked(false); wallpaperMayChange = true; mLayoutNeeded = true; + // Since the window list has been rebuilt, focus might + // have to be recomputed since the actual order of windows + // might have changed again. + focusMayChange = true; } int adjResult = 0; diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index 56270f48b45a..c3aeca42ede6 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -7182,7 +7182,6 @@ public final class ActivityManagerService extends ActivityManagerNative implemen if (DEBUG_TRANSITION) Log.v(TAG, "Prepare to back transition: task=" + task); - mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_TASK_TO_BACK); final int N = mHistory.size(); int bottom = 0; @@ -7212,7 +7211,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen mNoAnimActivities.add(r); } } else { - mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_TASK_TO_FRONT); + mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_TASK_TO_BACK); } mWindowManager.moveAppTokensToBottom(moved); if (VALIDATE_TOKENS) { |