diff options
author | Craig Mautner <cmautner@google.com> | 2013-10-22 17:36:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-22 17:36:57 +0000 |
commit | 7408234985707f98d4800cdd43a6fcaa35cb628a (patch) | |
tree | a842f33c369aaec7f9c826bed40724592ebd08d0 /services/java/com/android/server/am | |
parent | acc642bce9e1ca1782c8f93131d944d4a2f92be0 (diff) | |
parent | d1bbdb462afd280a599b3914bbf4256201641f35 (diff) | |
download | frameworks_base-7408234985707f98d4800cdd43a6fcaa35cb628a.zip frameworks_base-7408234985707f98d4800cdd43a6fcaa35cb628a.tar.gz frameworks_base-7408234985707f98d4800cdd43a6fcaa35cb628a.tar.bz2 |
Merge "Make sure mFocusedStack is never the home stack." into klp-dev
Diffstat (limited to 'services/java/com/android/server/am')
-rw-r--r-- | services/java/com/android/server/am/ActivityStackSupervisor.java | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/services/java/com/android/server/am/ActivityStackSupervisor.java b/services/java/com/android/server/am/ActivityStackSupervisor.java index 523015d..14312b6 100644 --- a/services/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/java/com/android/server/am/ActivityStackSupervisor.java @@ -1254,15 +1254,16 @@ public final class ActivityStackSupervisor { final TaskRecord task = r.task; if (r.isApplicationActivity() || (task != null && task.isApplicationTask())) { if (task != null) { - if (mFocusedStack != task.stack) { + final ActivityStack taskStack = task.stack; + if (mFocusedStack != taskStack) { if (DEBUG_FOCUS || DEBUG_STACK) Slog.d(TAG, "adjustStackFocus: Setting focused stack to r=" + r + " task=" + task); - mFocusedStack = task.stack; + mFocusedStack = taskStack.isHomeStack() ? null : taskStack; } else { if (DEBUG_FOCUS || DEBUG_STACK) Slog.d(TAG, "adjustStackFocus: Focused stack already=" + mFocusedStack); } - return mFocusedStack; + return taskStack; } if (mFocusedStack != null) { @@ -1282,8 +1283,8 @@ public final class ActivityStackSupervisor { } // Time to create the first app stack for this user. - int stackId = mService.createStack(-1, HOME_STACK_ID, - StackBox.TASK_STACK_GOES_OVER, 1.0f); + int stackId = + mService.createStack(-1, HOME_STACK_ID, StackBox.TASK_STACK_GOES_OVER, 1.0f); if (DEBUG_FOCUS || DEBUG_STACK) Slog.d(TAG, "adjustStackFocus: New stack r=" + r + " stackId=" + stackId); mFocusedStack = getStack(stackId); @@ -1308,7 +1309,8 @@ public final class ActivityStackSupervisor { if (DEBUG_FOCUS || DEBUG_STACK) Slog.d(TAG, "setFocusedStack: Setting focused stack to r=" + r + " task=" + r.task + " Callers=" + Debug.getCallers(3)); - mFocusedStack = r.task.stack; + final ActivityStack taskStack = r.task.stack; + mFocusedStack = taskStack.isHomeStack() ? null : taskStack; if (mStackState != STACK_STATE_HOME_IN_BACK) { if (DEBUG_STACK) Slog.d(TAG, "setFocusedStack: mStackState old=" + stackStateToString(mStackState) + " new=" + @@ -2367,12 +2369,13 @@ public final class ActivityStackSupervisor { } public void dump(PrintWriter pw, String prefix) { - pw.print(prefix); pw.print("mDismissKeyguardOnNextActivity:"); + pw.print(prefix); pw.print("mDismissKeyguardOnNextActivity="); pw.println(mDismissKeyguardOnNextActivity); - pw.print(prefix); pw.print("mStackState="); pw.println(stackStateToString(mStackState)); - pw.print(prefix); pw.println("mSleepTimeout: " + mSleepTimeout); - pw.print(prefix); pw.println("mCurTaskId: " + mCurTaskId); - pw.print(prefix); pw.println("mUserStackInFront: " + mUserStackInFront); + pw.print(prefix); pw.print("mFocusedStack=" + mFocusedStack); + pw.print(" mStackState="); pw.println(stackStateToString(mStackState)); + pw.print(prefix); pw.println("mSleepTimeout=" + mSleepTimeout); + pw.print(prefix); pw.println("mCurTaskId=" + mCurTaskId); + pw.print(prefix); pw.println("mUserStackInFront=" + mUserStackInFront); } ArrayList<ActivityRecord> getDumpActivitiesLocked(String name) { |