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:
@@ -75,26 +75,11 @@ public class PowerUsageFeatureProviderImpl implements PowerUsageFeatureProvider
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAdditionalBatteryInfoEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Intent getAdditionalBatteryInfoIntent() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAdvancedUiEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPowerAccountingToggleEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Estimate getEnhancedBatteryPrediction(Context context) {
|
||||
return null;
|
||||
@@ -146,6 +131,11 @@ public class PowerUsageFeatureProviderImpl implements PowerUsageFeatureProvider
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBatteryManagerSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Intent getResumeChargeIntent(boolean isDockDefender) {
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user