Add metric logs for special cases in Display and Battery page

Bug: 137559984
Test: robotest
Change-Id: I60f6237ac2c533306879f46ee4c25d54002cf0e9
This commit is contained in:
Jason Chiu
2020-03-20 19:02:06 +08:00
parent b3c16d5d4f
commit 26343b82ee
16 changed files with 117 additions and 63 deletions

View File

@@ -406,12 +406,13 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
mMetricsFeatureProvider.logStartedIntent(intent, sourceMetricCategory);
activity.startActivityForResultAsUser(intent, 0, tile.userHandle.get(0));
} else {
mMetricsFeatureProvider.logStartedIntent(intent, sourceMetricCategory);
final UserHandle userHandle = intent.getParcelableExtra(EXTRA_USER);
if (userHandle != null && tile.userHandle.contains(userHandle)) {
mMetricsFeatureProvider.logStartedIntent(intent, sourceMetricCategory);
activity.startActivityForResultAsUser(intent, 0, userHandle);
} else {
ProfileSelectDialog.show(activity.getSupportFragmentManager(), tile);
ProfileSelectDialog.show(activity.getSupportFragmentManager(), tile,
sourceMetricCategory);
}
}
}