Unconditionally move stack to front.

Recents was depending on using moveTaskToFront() to also move the
task's stack to the front. But that only works if the task is
actually in the stack because moveTaskToFront() doesn't do the
stack movement if the task is no longer in the stack. This change
calls ActivityStack.moveToFront() in addition to moveTaskToFront().

Fixes bug 17361027.

Also logs callingUid when starting an activity.

Change-Id: I023f956bafae00f45c58757ff5707ce520f02b55
This commit is contained in:
Craig Mautner
2014-09-03 10:01:24 -07:00
parent e8f8bc0ad6
commit 02a4aa261c

View File

@@ -1262,7 +1262,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
if (err == ActivityManager.START_SUCCESS) {
final int userId = aInfo != null ? UserHandle.getUserId(aInfo.applicationInfo.uid) : 0;
Slog.i(TAG, "START u" + userId + " {" + intent.toShortString(true, true, true, false)
+ "} from pid " + (callerApp != null ? callerApp.pid : callingPid)
+ "} from uid " + callingUid
+ " on display " + (container == null ? (mFocusedStack == null ?
Display.DEFAULT_DISPLAY : mFocusedStack.mDisplayId) :
(container.mActivityDisplay == null ? Display.DEFAULT_DISPLAY :
@@ -2075,6 +2075,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
}
targetStack = inTask.stack;
targetStack.moveTaskToFrontLocked(inTask, r, options);
targetStack.moveToFront();
mWindowManager.moveTaskToTop(inTask.taskId);
// Check whether we should actually launch the new activity in to the task,