Add log for battery tip action.
For each action, we add log when it is triggered. RestrictAppAction could be triggered in multiple locations (main page vs battery app detail page), so we add metricsKey to distinguish them Bug: 73888115 Test: RunSettingsRoboTests Change-Id: I08f28431c4e891bf90816ce91f551edc671579cd
This commit is contained in:
@@ -118,14 +118,14 @@ public class BatteryTipPreferenceController extends BasePreferenceController {
|
||||
if (batteryTip != null) {
|
||||
if (batteryTip.shouldShowDialog()) {
|
||||
BatteryTipDialogFragment dialogFragment = BatteryTipDialogFragment.newInstance(
|
||||
batteryTip);
|
||||
batteryTip, mFragment.getMetricsCategory());
|
||||
dialogFragment.setTargetFragment(mFragment, REQUEST_ANOMALY_ACTION);
|
||||
dialogFragment.show(mFragment.getFragmentManager(), TAG);
|
||||
} else {
|
||||
final BatteryTipAction action = BatteryTipUtils.getActionForBatteryTip(batteryTip,
|
||||
mSettingsActivity, mFragment);
|
||||
if (action != null) {
|
||||
action.handlePositiveAction();
|
||||
action.handlePositiveAction(mFragment.getMetricsCategory());
|
||||
}
|
||||
if (mBatteryTipListener != null) {
|
||||
mBatteryTipListener.onBatteryTipHandled(batteryTip);
|
||||
|
||||
Reference in New Issue
Block a user