summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/ChooseLockPattern.java
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2014-10-16 19:49:07 -0700
committerJim Miller <jaggies@google.com>2014-10-17 16:11:59 -0700
commit0698a216311acd9ab52224602d1a75c08bf89f04 (patch)
tree28f07d514028061fffc62dc416136adb34a9311c /src/com/android/settings/ChooseLockPattern.java
parent4f903c3e6502e1a87805a1def69c2a6f44bf601f (diff)
downloadpackages_apps_Settings-0698a216311acd9ab52224602d1a75c08bf89f04.tar.gz
packages_apps_Settings-0698a216311acd9ab52224602d1a75c08bf89f04.tar.bz2
packages_apps_Settings-0698a216311acd9ab52224602d1a75c08bf89f04.zip
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
Diffstat (limited to 'src/com/android/settings/ChooseLockPattern.java')
-rw-r--r--src/com/android/settings/ChooseLockPattern.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/com/android/settings/ChooseLockPattern.java b/src/com/android/settings/ChooseLockPattern.java
index 46bf94ca0..3d3ef1698 100644
--- a/src/com/android/settings/ChooseLockPattern.java
+++ b/src/com/android/settings/ChooseLockPattern.java
@@ -28,6 +28,7 @@ import static com.android.internal.widget.LockPatternView.DisplayMode;
import android.app.Activity;
import android.app.Fragment;
import android.content.ContentResolver;
+import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
@@ -68,6 +69,16 @@ public class ChooseLockPattern extends SettingsActivity {
return modIntent;
}
+ public static Intent createIntent(Context context, final boolean isFallback,
+ boolean requirePassword, boolean confirmCredentials) {
+ Intent intent = new Intent(context, ChooseLockPattern.class);
+ intent.putExtra("key_lock_method", "pattern");
+ intent.putExtra(ChooseLockGeneric.CONFIRM_CREDENTIALS, confirmCredentials);
+ intent.putExtra(LockPatternUtils.LOCKSCREEN_BIOMETRIC_WEAK_FALLBACK, isFallback);
+ intent.putExtra(EncryptionInterstitial.EXTRA_REQUIRE_PASSWORD, requirePassword);
+ return intent;
+ }
+
@Override
protected boolean isValidFragment(String fragmentName) {
if (ChooseLockPatternFragment.class.getName().equals(fragmentName)) return true;
@@ -528,6 +539,10 @@ public class ChooseLockPattern extends SettingsActivity {
final boolean isFallback = getActivity().getIntent()
.getBooleanExtra(LockPatternUtils.LOCKSCREEN_BIOMETRIC_WEAK_FALLBACK, false);
+
+ final boolean required = getActivity().getIntent().getBooleanExtra(
+ EncryptionInterstitial.EXTRA_REQUIRE_PASSWORD, true);
+ utils.setCredentialRequiredToDecrypt(required);
utils.saveLockPattern(mChosenPattern, isFallback);
utils.setLockPatternEnabled(true);