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:
@@ -25,6 +25,8 @@ import android.support.annotation.VisibleForTesting;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.util.SparseIntArray;
|
||||
|
||||
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@@ -123,6 +125,11 @@ public abstract class BatteryTip implements Comparable<BatteryTip>, Parcelable {
|
||||
*/
|
||||
public abstract void updateState(BatteryTip tip);
|
||||
|
||||
/**
|
||||
* Log the battery tip
|
||||
*/
|
||||
public abstract void log(Context context, MetricsFeatureProvider metricsFeatureProvider);
|
||||
|
||||
public Preference buildPreference(Context context) {
|
||||
Preference preference = new Preference(context);
|
||||
|
||||
|
Reference in New Issue
Block a user