Merge "Only set embedding rule for top level injection"
This commit is contained in:
committed by
Android (Google) Code Review
commit
e4a1b74e88
@@ -171,11 +171,13 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
|
|||||||
intent.setAction(action);
|
intent.setAction(action);
|
||||||
}
|
}
|
||||||
// Register the rule for injected apps.
|
// Register the rule for injected apps.
|
||||||
ActivityEmbeddingRulesController.registerTwoPanePairRuleForSettingsHome(
|
if (fragment instanceof TopLevelSettings) {
|
||||||
mContext,
|
ActivityEmbeddingRulesController.registerTwoPanePairRuleForSettingsHome(
|
||||||
new ComponentName(tile.getPackageName(), tile.getComponentName()),
|
mContext,
|
||||||
action,
|
new ComponentName(tile.getPackageName(), tile.getComponentName()),
|
||||||
true /* clearTop */);
|
action,
|
||||||
|
true /* clearTop */);
|
||||||
|
}
|
||||||
pref.setOnPreferenceClickListener(preference -> {
|
pref.setOnPreferenceClickListener(preference -> {
|
||||||
TopLevelHighlightMixin highlightMixin = null;
|
TopLevelHighlightMixin highlightMixin = null;
|
||||||
if (fragment instanceof TopLevelSettings
|
if (fragment instanceof TopLevelSettings
|
||||||
@@ -442,11 +444,6 @@ 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) {
|
||||||
|
@@ -97,7 +97,7 @@ public class ProfileSelectDialog extends DialogFragment implements OnClickListen
|
|||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
final UserHandle user = mSelectedTile.userHandle.get(which);
|
final UserHandle user = mSelectedTile.userHandle.get(which);
|
||||||
// Show menu on top level items.
|
// Show menu on top level items.
|
||||||
final Intent intent = mSelectedTile.getIntent();
|
final Intent intent = new Intent(mSelectedTile.getIntent());
|
||||||
FeatureFactory.getFactory(getContext()).getMetricsFeatureProvider()
|
FeatureFactory.getFactory(getContext()).getMetricsFeatureProvider()
|
||||||
.logStartedIntentWithProfile(intent, mSourceMetricCategory,
|
.logStartedIntentWithProfile(intent, mSourceMetricCategory,
|
||||||
which == 1 /* isWorkProfile */);
|
which == 1 /* isWorkProfile */);
|
||||||
|
Reference in New Issue
Block a user