Merge "Conditionally block battery percantage from search" into pi-dev

am: ea97a66383

Change-Id: If61f6e81aebd70c88e8fc75a525f53bed3ddbac1
This commit is contained in:
Matthew Fritze
2018-07-03 14:39:07 -07:00
committed by android-build-merger
2 changed files with 36 additions and 0 deletions

View File

@@ -472,6 +472,12 @@ public class PowerUsageSummary extends PowerUsageBase implements OnLongClickList
@Override
public List<String> getNonIndexableKeys(Context context) {
List<String> niks = super.getNonIndexableKeys(context);
final BatteryPercentagePreferenceController controller =
new BatteryPercentagePreferenceController(context);
if (!controller.isAvailable()) {
niks.add(controller.getPreferenceKey());
}
niks.add(KEY_BATTERY_SAVER_SUMMARY);
return niks;
}