Add a skeleton to support battery configucation backup/restore
Bug: 192523697 Test: make SettingsRoboTests Change-Id: I559eed40b05b73e7af5e091115afb11c4ba51068
This commit is contained in:
@@ -40,7 +40,8 @@ public class BatteryDiffEntry {
|
||||
// Caches app label and icon to improve loading performance.
|
||||
static final Map<String, BatteryEntry.NameAndIcon> sResourceCache = new HashMap<>();
|
||||
// Whether a specific item is valid to launch restriction page?
|
||||
static final Map<String, Boolean> sValidForRestriction = new HashMap<>();
|
||||
@VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
|
||||
public static final Map<String, Boolean> sValidForRestriction = new HashMap<>();
|
||||
|
||||
/** A comparator for {@link BatteryDiffEntry} based on consumed percentage. */
|
||||
public static final Comparator<BatteryDiffEntry> COMPARATOR =
|
||||
@@ -339,7 +340,8 @@ public class BatteryDiffEntry {
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
static void clearCache() {
|
||||
/** Clears app icon and label cache data. */
|
||||
public static void clearCache() {
|
||||
sResourceCache.clear();
|
||||
sValidForRestriction.clear();
|
||||
}
|
||||
|
Reference in New Issue
Block a user