Merge "Launch activities in another task if the metadata is set." into sc-v2-dev am: 14a90d0639

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15959659

Change-Id: I1383024f1ce9c8b6c5f7e92d42c5d7bcd8756181
This commit is contained in:
TreeHugger Robot
2021-10-05 11:58:59 +00:00
committed by Automerger Merge Worker

View File

@@ -421,6 +421,11 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
ProfileSelectDialog.updateUserHandlesIfNeeded(mContext, tile); ProfileSelectDialog.updateUserHandlesIfNeeded(mContext, tile);
mMetricsFeatureProvider.logStartedIntent(intent, sourceMetricCategory); 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()) { if (tile.userHandle == null || tile.isPrimaryProfileOnly()) {
activity.startActivity(intent); activity.startActivity(intent);
} else if (tile.userHandle.size() == 1) { } else if (tile.userHandle.size() == 1) {