diff options
author | Svetoslav <svetoslavganov@google.com> | 2014-10-17 23:08:40 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-17 23:08:40 +0000 |
commit | edbada7acd2d40db1c472e291f3191c6f26d980a (patch) | |
tree | e83f09532153a09acc773a21478e1741ae417600 /src/com | |
parent | 06a314d65ad1583e76394d6c5846e3bbfd8eedcb (diff) | |
parent | ba202e9fb299f4557190dbad5ed989a9c83a4380 (diff) | |
download | packages_apps_Settings-edbada7acd2d40db1c472e291f3191c6f26d980a.tar.gz packages_apps_Settings-edbada7acd2d40db1c472e291f3191c6f26d980a.tar.bz2 packages_apps_Settings-edbada7acd2d40db1c472e291f3191c6f26d980a.zip |
am ba202e9f: Merge "Accessibility no longer overrides strong encryption (Settings)." into lmp-dev
* commit 'ba202e9fb299f4557190dbad5ed989a9c83a4380':
Accessibility no longer overrides strong encryption (Settings).
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/settings/ChooseLockGeneric.java | 4 | ||||
-rw-r--r-- | src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java | 15 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/com/android/settings/ChooseLockGeneric.java b/src/com/android/settings/ChooseLockGeneric.java index 89ba20bbe..40fa69e6e 100644 --- a/src/com/android/settings/ChooseLockGeneric.java +++ b/src/com/android/settings/ChooseLockGeneric.java @@ -331,6 +331,10 @@ public class ChooseLockGeneric extends SettingsActivity { } private void updatePreferenceSummaryIfNeeded() { + if (LockPatternUtils.isDeviceEncrypted()) { + return; + } + if (AccessibilityManager.getInstance(getActivity()).getEnabledAccessibilityServiceList( AccessibilityServiceInfo.FEEDBACK_ALL_MASK).isEmpty()) { return; diff --git a/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java b/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java index 71b586287..08fba6719 100644 --- a/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java +++ b/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java @@ -55,7 +55,7 @@ public class ToggleAccessibilityServicePreferenceFragment private static final int DIALOG_ID_ENABLE_WARNING = 1; private static final int DIALOG_ID_DISABLE_WARNING = 2; - public static final int ACTIVITY_REQUEST_CONFIRM_CREDENTIAL = 1; + public static final int ACTIVITY_REQUEST_CONFIRM_CREDENTIAL_FOR_WEAKER_ENCRYPTION = 1; private LockPatternUtils mLockPatternUtils; @@ -284,9 +284,17 @@ public class ToggleAccessibilityServicePreferenceFragment @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { - if (requestCode == ACTIVITY_REQUEST_CONFIRM_CREDENTIAL) { + if (requestCode == ACTIVITY_REQUEST_CONFIRM_CREDENTIAL_FOR_WEAKER_ENCRYPTION) { if (resultCode == Activity.RESULT_OK) { handleConfirmServiceEnabled(true); + // The user confirmed that they accept weaker encryption when + // enabling the accessibility service, so change encryption. + // Since we came here asynchronously, check encryption again. + if (LockPatternUtils.isDeviceEncrypted()) { + mLockPatternUtils.clearEncryptionPassword(); + Settings.Global.putInt(getContentResolver(), + Settings.Global.REQUIRE_PASSWORD_TO_DECRYPT, 0); + } } else { handleConfirmServiceEnabled(false); } @@ -302,7 +310,8 @@ public class ToggleAccessibilityServicePreferenceFragment if (LockPatternUtils.isDeviceEncrypted()) { String title = createConfirmCredentialReasonMessage(); Intent intent = ConfirmDeviceCredentialActivity.createIntent(title, null); - startActivityForResult(intent, ACTIVITY_REQUEST_CONFIRM_CREDENTIAL); + startActivityForResult(intent, + ACTIVITY_REQUEST_CONFIRM_CREDENTIAL_FOR_WEAKER_ENCRYPTION); } else { handleConfirmServiceEnabled(true); } |