Merge "Bring task with root activity to front when launching from recents." into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f61bc8a262
@ -3619,6 +3619,10 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
if (task == null) {
|
if (task == null) {
|
||||||
throw new IllegalArgumentException("Task " + taskId + " not found.");
|
throw new IllegalArgumentException("Task " + taskId + " not found.");
|
||||||
}
|
}
|
||||||
|
if (task.getRootActivity() != null) {
|
||||||
|
moveTaskToFrontLocked(task.taskId, 0, null);
|
||||||
|
return ActivityManager.START_TASK_TO_FRONT;
|
||||||
|
}
|
||||||
callingUid = task.mCallingUid;
|
callingUid = task.mCallingUid;
|
||||||
callingPackage = task.mCallingPackage;
|
callingPackage = task.mCallingPackage;
|
||||||
intent = task.intent;
|
intent = task.intent;
|
||||||
@ -19443,20 +19447,8 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
@Override
|
@Override
|
||||||
public void moveToFront() {
|
public void moveToFront() {
|
||||||
checkCaller();
|
checkCaller();
|
||||||
|
// Will bring task to front if it already has a root activity.
|
||||||
final TaskRecord tr;
|
startActivityFromRecentsInner(mTaskId, null);
|
||||||
synchronized (ActivityManagerService.this) {
|
|
||||||
tr = recentTaskForIdLocked(mTaskId);
|
|
||||||
if (tr == null) {
|
|
||||||
throw new IllegalArgumentException("Unable to find task ID " + mTaskId);
|
|
||||||
}
|
|
||||||
if (tr.getRootActivity() != null) {
|
|
||||||
moveTaskToFrontLocked(tr.taskId, 0, null);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
startActivityFromRecentsInner(tr.taskId, null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user