Add isBatteryManagerSupported() to control adaptive preferences page

Add isBatteryManagerSupported() in the PowerUsageFeatureProvider to
support controlling the adaptive preferences page dynamically

Bug: 229558366
Test: presubmit
Change-Id: Iffb552feb9e08ca72f2970eb778cd3fcd18f0b7e
This commit is contained in:
ykhung
2022-12-27 14:34:12 +08:00
parent fec083b2cd
commit b875752307
5 changed files with 34 additions and 46 deletions

View File

@@ -39,21 +39,11 @@ public interface PowerUsageFeatureProvider {
*/
boolean isLocationSettingEnabled(String[] packages);
/**
* Check whether additional battery info feature is enabled.
*/
boolean isAdditionalBatteryInfoEnabled();
/**
* Gets an {@link Intent} to show additional battery info.
*/
Intent getAdditionalBatteryInfoIntent();
/**
* Check whether advanced ui is enabled
*/
boolean isAdvancedUiEnabled();
/**
* Check whether it is type service
*/
@@ -64,11 +54,6 @@ public interface PowerUsageFeatureProvider {
*/
boolean isTypeSystem(int uid, String[] packages);
/**
* Check whether the toggle for power accounting is enabled
*/
boolean isPowerAccountingToggleEnabled();
/**
* Returns an improved prediction for battery time remaining.
*/
@@ -130,6 +115,11 @@ public interface PowerUsageFeatureProvider {
*/
boolean isAdaptiveChargingSupported();
/**
* Checks whether battery manager feature is supported in this device
*/
boolean isBatteryManagerSupported();
/**
* Returns {@code true} if current defender mode is extra defend
*/