Several fixes to new EncryptionInterstitial dialog.

The code now observes whether accessibility is turned on when
deciding the default state.

Additionally, it fixes a bug where the user can back out of
EncryptionInterstitial and leave the setting in a bad state.
We now propagate the state until the place where it ultimately
gets stored.

Also fixes problem where Encryption was ignoring the state
where the device was already encrypted.

Fixes bug 17881324

Change-Id: Iec09e4464832a506bb2a78bb14a38b3531971fa0
This commit is contained in:
Jim Miller
2014-10-16 19:49:07 -07:00
parent 4f903c3e65
commit 0698a21631
6 changed files with 92 additions and 42 deletions

View File

@@ -216,15 +216,12 @@ public class SecuritySettings extends SettingsPreferenceFragment
}
if (mIsPrimary) {
switch (mDPM.getStorageEncryptionStatus()) {
case DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE:
if (LockPatternUtils.isDeviceEncryptionEnabled()) {
// The device is currently encrypted.
addPreferencesFromResource(R.xml.security_settings_encrypted);
break;
case DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE:
} else {
// This device supports encryption but isn't encrypted.
addPreferencesFromResource(R.xml.security_settings_unencrypted);
break;
}
}