Merge "Force ActivityView activities to start in new task" into klp-modular-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
7d2d2272f1
@@ -2937,6 +2937,8 @@ public final class ActivityStackSupervisor implements DisplayListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class ActivityContainer extends android.app.IActivityContainer.Stub {
|
class ActivityContainer extends android.app.IActivityContainer.Stub {
|
||||||
|
final static int FORCE_NEW_TASK_FLAGS = Intent.FLAG_ACTIVITY_NEW_TASK |
|
||||||
|
Intent.FLAG_ACTIVITY_MULTIPLE_TASK;
|
||||||
final int mStackId;
|
final int mStackId;
|
||||||
IActivityContainerCallback mCallback = null;
|
IActivityContainerCallback mCallback = null;
|
||||||
final ActivityStack mStack;
|
final ActivityStack mStack;
|
||||||
@@ -3033,6 +3035,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
|
|||||||
int userId = mService.handleIncomingUser(Binder.getCallingPid(),
|
int userId = mService.handleIncomingUser(Binder.getCallingPid(),
|
||||||
Binder.getCallingUid(), mCurrentUser, false, true, "ActivityContainer", null);
|
Binder.getCallingUid(), mCurrentUser, false, true, "ActivityContainer", null);
|
||||||
// TODO: Switch to user app stacks here.
|
// TODO: Switch to user app stacks here.
|
||||||
|
intent.addFlags(FORCE_NEW_TASK_FLAGS);
|
||||||
String mimeType = intent.getType();
|
String mimeType = intent.getType();
|
||||||
if (mimeType == null && intent.getData() != null
|
if (mimeType == null && intent.getData() != null
|
||||||
&& "content".equals(intent.getData().getScheme())) {
|
&& "content".equals(intent.getData().getScheme())) {
|
||||||
@@ -3051,7 +3054,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return ((PendingIntentRecord)intentSender).sendInner(0, null, null, null, null, null,
|
return ((PendingIntentRecord)intentSender).sendInner(0, null, null, null, null, null,
|
||||||
null, 0, 0, 0, null, this);
|
null, 0, FORCE_NEW_TASK_FLAGS, FORCE_NEW_TASK_FLAGS, null, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user