Add auto restriction preference

1. Add method in feature provider to check whether smart battery
is supported
2. Hook up above method to controllers
3. Add auto restriction preference
4. Add tests

Bug: 73002171
Test: RunSettingsRoboTests
Change-Id: Ic314f61ad52e9bedb629b308731cb968bb4b1773
Merged-In: Ic314f61ad52e9bedb629b308731cb968bb4b1773
(cherry picked from commit ab0b0add0a)
This commit is contained in:
jackqdyulei
2018-03-06 10:28:29 -08:00
committed by Lei Yu
parent b76682afcb
commit 155c1785e1
9 changed files with 242 additions and 5 deletions

View File

@@ -136,4 +136,9 @@ public class PowerUsageFeatureProviderImpl implements PowerUsageFeatureProvider
public boolean getEarlyWarningSignal(Context context, String id) {
return false;
}
@Override
public boolean isSmartBatterySupported() {
return false;
}
}