Format battery java code

After this CL, we can follow Guideline:go/hc-mainline-dev#format-code to keep java format consistent.

Test: manual
Bug: 304439460
Change-Id: I5bb77f81b0bd9be618e34942eaaee8296bc42796
This commit is contained in:
Jun Lan
2023-11-02 18:55:52 +08:00
parent da70c86bda
commit cca804e1ed
127 changed files with 4343 additions and 3581 deletions

View File

@@ -25,16 +25,17 @@ import androidx.annotation.VisibleForTesting;
import java.util.Objects;
/**
* Model class stores app info(e.g. package name, type..) that used in battery tip
*/
/** Model class stores app info(e.g. package name, type..) that used in battery tip */
public class AppInfo implements Comparable<AppInfo>, Parcelable {
public final String packageName;
/**
* Anomaly type of the app
*
* @see StatsManagerConfig.AnomalyType
*/
public final ArraySet<Integer> anomalyTypes;
public final long screenOnTimeMs;
public final int uid;
@@ -73,7 +74,11 @@ public class AppInfo implements Comparable<AppInfo>, Parcelable {
@Override
public String toString() {
return "packageName=" + packageName + ",anomalyTypes=" + anomalyTypes + ",screenTime="
return "packageName="
+ packageName
+ ",anomalyTypes="
+ anomalyTypes
+ ",screenTime="
+ screenOnTimeMs;
}
@@ -93,15 +98,16 @@ public class AppInfo implements Comparable<AppInfo>, Parcelable {
&& TextUtils.equals(packageName, other.packageName);
}
public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
public AppInfo createFromParcel(Parcel in) {
return new AppInfo(in);
}
public static final Parcelable.Creator CREATOR =
new Parcelable.Creator() {
public AppInfo createFromParcel(Parcel in) {
return new AppInfo(in);
}
public AppInfo[] newArray(int size) {
return new AppInfo[size];
}
};
public AppInfo[] newArray(int size) {
return new AppInfo[size];
}
};
public static final class Builder {
private ArraySet<Integer> mAnomalyTypes = new ArraySet<>();
@@ -133,4 +139,4 @@ public class AppInfo implements Comparable<AppInfo>, Parcelable {
return new AppInfo(this);
}
}
}
}