diff options
author | Svetoslav <svetoslavganov@google.com> | 2014-10-17 14:37:02 -0700 |
---|---|---|
committer | Svetoslav <svetoslavganov@google.com> | 2014-10-17 14:41:58 -0700 |
commit | 40ca78f6f3d75897a1a5fd3ec999f487430d4b40 (patch) | |
tree | 8d0309f680d15c9672b6979af98a6f025ccb465b /src/com/android/settings/accessibility | |
parent | 3ea423ae0ff56d249b6844b3a68c67ee5eba243d (diff) | |
download | packages_apps_Settings-40ca78f6f3d75897a1a5fd3ec999f487430d4b40.zip packages_apps_Settings-40ca78f6f3d75897a1a5fd3ec999f487430d4b40.tar.gz packages_apps_Settings-40ca78f6f3d75897a1a5fd3ec999f487430d4b40.tar.bz2 |
Accessibility no longer overrides strong encryption (Settings).
Updating the accessibility layer behavior to reflect the new
model where accessibility no longer overrides strong encryption.
Now enabling an accessibility service lowers the encryption
level but the user can bump it up in settings if desired.
bug:17881324
Change-Id: Iaf46cbabf1c19c193ea39b35add27aaa4ff509e4
Diffstat (limited to 'src/com/android/settings/accessibility')
-rw-r--r-- | src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java b/src/com/android/settings/accessibility/ToggleAccessibilityServicePreferenceFragment.java index 71b5862..08fba67 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); } |