Merge "Hide BatteryManagerPreference if there is no adaptive charging" into udc-dev

This commit is contained in:
YK Hung
2023-03-03 12:04:29 +00:00
committed by Android (Google) Code Review
3 changed files with 12 additions and 7 deletions

View File

@@ -51,6 +51,7 @@ public class BatteryManagerPreferenceController extends BasePreferenceController
@Override
public int getAvailabilityStatus() {
return mPowerUsageFeatureProvider.isBatteryManagerSupported()
&& mPowerUsageFeatureProvider.isAdaptiveChargingSupported()
? AVAILABLE_UNSEARCHABLE : UNSUPPORTED_ON_DEVICE;
}