Refactor PowerUsageFeatureProvider: Cache the config set to avoid generating the set again.
Bug: 262802531 Test: manual Change-Id: I61b36e4e057c432d814aa104a37f0e0d552720cb
This commit is contained in:
@@ -67,12 +67,12 @@ public class PowerUsageFeatureProviderImpl implements PowerUsageFeatureProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBatteryUsageEnabled(Context context) {
|
||||
public boolean isBatteryUsageEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getSystemAppsAllowlist(Context context) {
|
||||
public List<String> getSystemAppsAllowlist() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -153,27 +153,27 @@ public class PowerUsageFeatureProviderImpl implements PowerUsageFeatureProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Integer> getOthersSystemComponentSet(Context context) {
|
||||
public Set<Integer> getOthersSystemComponentSet() {
|
||||
return new ArraySet<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Integer> getHideSystemComponentSet(Context context) {
|
||||
public Set<Integer> getHideSystemComponentSet() {
|
||||
return new ArraySet<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<CharSequence> getHideApplicationSet(Context context) {
|
||||
public Set<String> getHideApplicationSet() {
|
||||
return new ArraySet<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<CharSequence> getHideBackgroundUsageTimeSet(Context context) {
|
||||
public Set<String> getHideBackgroundUsageTimeSet() {
|
||||
return new ArraySet<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<CharSequence> getIgnoreScreenOnTimeTaskRootSet(Context context) {
|
||||
public Set<String> getIgnoreScreenOnTimeTaskRootSet() {
|
||||
return new ArraySet<>();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user