Add extra log for battery tip.
For each visible battery tip, logs its type and state. For battery tip with app list, also log that list: 1. HighUsageTip: apps that used too much battery 2. RestrictAppTip: apps with anomaly, also logs the anomaly type Bug: 73888115 Test: RunSettingsRoboTests Change-Id: I1b61eb1d793d979baab4864d2d652e12260b590d
This commit is contained in:
@@ -20,7 +20,9 @@ import android.content.Context;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.settings.R;
|
||||
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
|
||||
|
||||
/**
|
||||
* Tip to show general summary about battery life
|
||||
@@ -55,6 +57,12 @@ public class SummaryTip extends BatteryTip {
|
||||
mState = tip.mState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void log(Context context, MetricsFeatureProvider metricsFeatureProvider) {
|
||||
metricsFeatureProvider.action(context, MetricsProto.MetricsEvent.ACTION_SUMMARY_TIP,
|
||||
mState);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
|
||||
public BatteryTip createFromParcel(Parcel in) {
|
||||
return new SummaryTip(in);
|
||||
|
||||
Reference in New Issue
Block a user