Merge "Conditionally block battery percantage from search" into pi-dev
am: ea97a66383
Change-Id: If61f6e81aebd70c88e8fc75a525f53bed3ddbac1
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user