Merge "RESTRICT AUTOMERGE: Catch exceptions from setLockCredential()" into tm-qpr-dev
This commit is contained in:
@@ -1048,8 +1048,13 @@ public class ChooseLockPassword extends SettingsActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Pair<Boolean, Intent> saveAndVerifyInBackground() {
|
protected Pair<Boolean, Intent> saveAndVerifyInBackground() {
|
||||||
final boolean success = mUtils.setLockCredential(
|
boolean success;
|
||||||
mChosenPassword, mCurrentCredential, mUserId);
|
try {
|
||||||
|
success = mUtils.setLockCredential(mChosenPassword, mCurrentCredential, mUserId);
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
Log.e(TAG, "Failed to set lockscreen credential", e);
|
||||||
|
success = false;
|
||||||
|
}
|
||||||
if (success) {
|
if (success) {
|
||||||
unifyProfileCredentialIfRequested();
|
unifyProfileCredentialIfRequested();
|
||||||
}
|
}
|
||||||
|
@@ -909,8 +909,13 @@ public class ChooseLockPattern extends SettingsActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected Pair<Boolean, Intent> saveAndVerifyInBackground() {
|
protected Pair<Boolean, Intent> saveAndVerifyInBackground() {
|
||||||
final int userId = mUserId;
|
final int userId = mUserId;
|
||||||
final boolean success = mUtils.setLockCredential(mChosenPattern, mCurrentCredential,
|
boolean success;
|
||||||
userId);
|
try {
|
||||||
|
success = mUtils.setLockCredential(mChosenPattern, mCurrentCredential, userId);
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
Log.e(TAG, "Failed to set lockscreen credential", e);
|
||||||
|
success = false;
|
||||||
|
}
|
||||||
if (success) {
|
if (success) {
|
||||||
unifyProfileCredentialIfRequested();
|
unifyProfileCredentialIfRequested();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user