Merge sub pages for lock/unlock into 1 xml.

And create PreferenceControllers for each setting

The page is still pretty janky and controllers are invoked manually.
Next CL will clean these up.

Bug: 32953042
Test: TODO
Change-Id: I1d7478324f5de4fdb464d79f89086f7e79c0ee67
This commit is contained in:
Fan Zhang
2018-01-03 15:02:02 -08:00
parent 05d1b4c00e
commit 928ddbe731
21 changed files with 1050 additions and 601 deletions

View File

@@ -161,7 +161,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
private LocationPreferenceController mLocationcontroller;
private ManageDeviceAdminPreferenceController mManageDeviceAdminPreferenceController;
private EnterprisePrivacyPreferenceController mEnterprisePrivacyPreferenceController;
private LockScreenNotificationPreferenceController mLockScreenNotificationPreferenceController;
@Override
public int getMetricsCategory() {
@@ -208,8 +207,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
= new ManageDeviceAdminPreferenceController(activity);
mEnterprisePrivacyPreferenceController
= new EnterprisePrivacyPreferenceController(activity);
mLockScreenNotificationPreferenceController
= new LockScreenNotificationPreferenceController(activity);
}
private static int getResIdForLockUnlockScreen(LockPatternUtils lockPatternUtils,
@@ -430,7 +427,7 @@ public class SecuritySettings extends SettingsPreferenceFragment
final Preference lockscreenPreferences = group.findPreference(KEY_LOCKSCREEN_PREFERENCES);
if (lockscreenPreferences != null) {
lockscreenPreferences.setSummary(
mLockScreenNotificationPreferenceController.getSummaryResource());
LockScreenNotificationPreferenceController.getSummaryResource(getContext()));
}
}