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
This commit is contained in:
@@ -133,7 +133,8 @@ public class RestrictedAppDetails extends DashboardFragment {
|
||||
try {
|
||||
final ApplicationInfo applicationInfo = mPackageManager.getApplicationInfoAsUser(
|
||||
appInfo.packageName, 0 /* flags */, UserHandle.getUserId(appInfo.uid));
|
||||
checkBoxPreference.setChecked(true);
|
||||
checkBoxPreference.setChecked(
|
||||
mBatteryUtils.isForceAppStandbyEnabled(appInfo.uid, appInfo.packageName));
|
||||
checkBoxPreference.setTitle(mPackageManager.getApplicationLabel(applicationInfo));
|
||||
checkBoxPreference.setIcon(
|
||||
Utils.getBadgedIcon(mIconDrawableFactory, mPackageManager,
|
||||
|
Reference in New Issue
Block a user