OSDN Git Service

update checkbox based on FAS API
authorLei Yu <jackqdyulei@google.com>
Tue, 17 Apr 2018 20:23:15 +0000 (13:23 -0700)
committerLei Yu <jackqdyulei@google.com>
Wed, 18 Apr 2018 17:58:06 +0000 (10:58 -0700)
commit98eb902ead5600d49c0def5191c0b2e7c4b9115c
treea4dec91178e69a963f03d87f307b6420c9045431
parent1257466d0bc7d51512cea2a455584589427b4276
update checkbox based on FAS API

Before this CL, we assumed all the apps in this page were restricted and
didn't consider that user may uncheck one and rotate the screen.

In this CL, when we create checkbox, we will update the state through
FAS API to make sure checkbox is up-to-date.

Change-Id: I4e89908591f0688b4170806db4b6631bf921f2e9
Fixes: 78161466
Test: RunSettingsRoboTests
src/com/android/settings/fuelgauge/BatteryUtils.java
src/com/android/settings/fuelgauge/RestrictedAppDetails.java
tests/robotests/src/com/android/settings/fuelgauge/BatteryUtilsTest.java
tests/robotests/src/com/android/settings/fuelgauge/RestrictedAppDetailsTest.java