summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Filip Gruszczynski <gruszczy@google.com> 2015-10-13 16:59:34 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-10-13 16:59:34 +0000
commitd416d88696f48e6514a1b3649e63123176222aa2 (patch)
tree0b7dbfc36737de4799e233438bb5966aa9136be6
parent45610acb90abc821c34943064cb6fe1546baa7b4 (diff)
parent013b12f6994551eccb1d7b40eaf7695b1d23e30d (diff)
Merge "Set focused activity when moving task fullscreen."
-rw-r--r--services/core/java/com/android/server/am/ActivityStackSupervisor.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 5df0490f0af9..3cb98878ac86 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -3228,9 +3228,16 @@ public final class ActivityStackSupervisor implements DisplayListener {
// Apps may depend on onResume()/onPause() being called in pairs.
if (wasResumed) {
stack.mResumedActivity = r;
+ // Move the stack in which we are placing the task to the front. We don't use
+ // ActivityManagerService.setFocusedActivityLocked, because if the activity is
+ // already focused, the call will short-circuit and do nothing.
+ stack.moveToFront(reason);
+ } else {
+ // We need to not only move the stack to the front, but also have the activity
+ // focused. This will achieve both goals.
+ mService.setFocusedActivityLocked(r, reason);
}
- // move the stack in which we are placing the task to the front.
- stack.moveToFront(reason);
+
}
return stack;