summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-16 20:01:44 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-16 20:01:44 +0100
commita1bf2fd62ee9713770d0e45aaadcefa912fdeafb (patch)
tree1d877427315fc2469c95bd96d2485165e65c7396
parent1c224e1186090db1a617eafe4c492992a869b427 (diff)
downloadpackages_apps_Settings-a1bf2fd62ee9713770d0e45aaadcefa912fdeafb.zip
packages_apps_Settings-a1bf2fd62ee9713770d0e45aaadcefa912fdeafb.tar.gz
packages_apps_Settings-a1bf2fd62ee9713770d0e45aaadcefa912fdeafb.tar.bz2
Adapt CopperheadOS patch for changed CyanogenMod's API
userId and lock pattern size needs to be specified. Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
-rw-r--r--src/com/android/settings/ReplaceEncryptionPassword.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/settings/ReplaceEncryptionPassword.java b/src/com/android/settings/ReplaceEncryptionPassword.java
index f3d0532..b6869d8 100644
--- a/src/com/android/settings/ReplaceEncryptionPassword.java
+++ b/src/com/android/settings/ReplaceEncryptionPassword.java
@@ -50,6 +50,7 @@ public class ReplaceEncryptionPassword extends SettingsActivity {
public static class ReplaceEncryptionPasswordFragment extends Fragment {
private static final int KEYGUARD_REQUEST = 55;
+ private byte mPatternSize = LockPatternUtils.PATTERN_SIZE_DEFAULT;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -74,6 +75,7 @@ public class ReplaceEncryptionPassword extends SettingsActivity {
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
+ final int userId = UserHandle.myUserId();
if (requestCode != KEYGUARD_REQUEST) {
return;
@@ -86,8 +88,12 @@ public class ReplaceEncryptionPassword extends SettingsActivity {
int type = data.getIntExtra(ChooseLockSettingsHelper.EXTRA_KEY_TYPE, -1);
String password = data.getStringExtra(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD);
if (type == StorageManager.CRYPT_TYPE_PATTERN) {
+ mPatternSize = getActivity().getIntent().getByteExtra("pattern_size",
+ LockPatternUtils.PATTERN_SIZE_DEFAULT);
+
utils.replaceSeparateEncryptionPasswordWithPattern(
- utils.stringToPattern(password));
+ utils.stringToPattern(password,
+ mPatternSize), userId);
} else {
utils.replaceSeparateEncryptionPassword(password);
}