Don't show RedactionInterstitial when changing password
Only show when going from an insecure to secure lock. Bug: 18467783 Change-Id: Ia73682d45b1dcd9ad61a00abeac099a94256e3b7
This commit is contained in:
@@ -425,6 +425,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
if (mFirstPin.equals(pin)) {
|
||||
final boolean isFallback = getActivity().getIntent().getBooleanExtra(
|
||||
LockPatternUtils.LOCKSCREEN_BIOMETRIC_WEAK_FALLBACK, false);
|
||||
boolean wasSecureBefore = mLockPatternUtils.isSecure();
|
||||
mLockPatternUtils.clearLock(isFallback);
|
||||
final boolean required = getActivity().getIntent().getBooleanExtra(
|
||||
EncryptionInterstitial.EXTRA_REQUIRE_PASSWORD, true);
|
||||
@@ -433,7 +434,9 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
getActivity().setResult(RESULT_FINISHED);
|
||||
getActivity().finish();
|
||||
mDone = true;
|
||||
if (!wasSecureBefore) {
|
||||
startActivity(RedactionInterstitial.createStartIntent(getActivity()));
|
||||
}
|
||||
} else {
|
||||
CharSequence tmp = mPasswordEntry.getText();
|
||||
if (tmp != null) {
|
||||
|
@@ -540,6 +540,8 @@ public class ChooseLockPattern extends SettingsActivity {
|
||||
final boolean isFallback = getActivity().getIntent()
|
||||
.getBooleanExtra(LockPatternUtils.LOCKSCREEN_BIOMETRIC_WEAK_FALLBACK, false);
|
||||
|
||||
boolean wasSecureBefore = utils.isSecure();
|
||||
|
||||
final boolean required = getActivity().getIntent().getBooleanExtra(
|
||||
EncryptionInterstitial.EXTRA_REQUIRE_PASSWORD, true);
|
||||
utils.setCredentialRequiredToDecrypt(required);
|
||||
@@ -553,7 +555,9 @@ public class ChooseLockPattern extends SettingsActivity {
|
||||
getActivity().setResult(RESULT_FINISHED);
|
||||
getActivity().finish();
|
||||
mDone = true;
|
||||
if (!wasSecureBefore) {
|
||||
startActivity(RedactionInterstitial.createStartIntent(getActivity()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user