Merge "Add dump log for BatteryTip." into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
26b5b5b5db
@@ -68,6 +68,12 @@ public class AppInfo implements Comparable<AppInfo>, Parcelable {
|
||||
dest.writeInt(uid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "packageName=" + packageName + ",anomalyType=" + anomalyType + ",screenTime="
|
||||
+ screenOnTimeMs;
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
|
||||
public AppInfo createFromParcel(Parcel in) {
|
||||
return new AppInfo(in);
|
||||
|
@@ -158,4 +158,9 @@ public abstract class BatteryTip implements Comparable<BatteryTip>, Parcelable {
|
||||
public int compareTo(BatteryTip o) {
|
||||
return TIP_ORDER.get(mType) - TIP_ORDER.get(o.mType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "type=" + mType + " state=" + mState;
|
||||
}
|
||||
}
|
||||
|
@@ -86,6 +86,19 @@ public class HighUsageTip extends BatteryTip {
|
||||
return mHighUsageAppList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder stringBuilder = new StringBuilder(super.toString());
|
||||
stringBuilder.append(" {");
|
||||
for (int i = 0, size = mHighUsageAppList.size(); i < size; i++) {
|
||||
final AppInfo appInfo = mHighUsageAppList.get(i);
|
||||
stringBuilder.append(" " + appInfo.toString() + " ");
|
||||
}
|
||||
stringBuilder.append('}');
|
||||
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
|
||||
public BatteryTip createFromParcel(Parcel in) {
|
||||
return new HighUsageTip(in);
|
||||
|
@@ -97,6 +97,19 @@ public class RestrictAppTip extends BatteryTip {
|
||||
return mRestrictAppList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder stringBuilder = new StringBuilder(super.toString());
|
||||
stringBuilder.append(" {");
|
||||
for (int i = 0, size = mRestrictAppList.size(); i < size; i++) {
|
||||
final AppInfo appInfo = mRestrictAppList.get(i);
|
||||
stringBuilder.append(" " + appInfo.toString() + " ");
|
||||
}
|
||||
stringBuilder.append('}');
|
||||
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
|
Reference in New Issue
Block a user