Merge "Fix battery optimization display problems"

This commit is contained in:
Arc Wang
2021-01-25 03:12:11 +00:00
committed by Android (Google) Code Review
3 changed files with 9 additions and 0 deletions

View File

@@ -69,6 +69,7 @@ public class BatteryOptimizationPreferenceController extends AbstractPreferenceC
@Override
public void updateState(Preference preference) {
mBackend.refreshList();
final boolean isAllowlisted = mBackend.isAllowlisted(mPackageName);
preference.setSummary(isAllowlisted ? R.string.high_power_on : R.string.high_power_off);
}