Launch activities in another task if the metadata is set.
Add FLAG_ACTIVITY_NEW_TASK to the intent if META_DATA_LAUNCH_NEW_TASK is set to true to make it launch a separate task. Bug: 197702494 Bug: 197700978 Bug: 197702789 Test: Set this metadata to true and make sure this page is launched in another task. Change-Id: I3b4e5745e940a3db5db6be51e17a9c505915e3c0
This commit is contained in:
@@ -421,6 +421,11 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
|
||||
ProfileSelectDialog.updateUserHandlesIfNeeded(mContext, tile);
|
||||
mMetricsFeatureProvider.logStartedIntent(intent, sourceMetricCategory);
|
||||
|
||||
//TODO(b/201970810): Add test cases.
|
||||
if (tile.isNewTask(mContext)) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
}
|
||||
|
||||
if (tile.userHandle == null || tile.isPrimaryProfileOnly()) {
|
||||
activity.startActivity(intent);
|
||||
} else if (tile.userHandle.size() == 1) {
|
||||
|
Reference in New Issue
Block a user