Fix a NPE in confirm lock screen.
The NPE happens is when using pin later. It's too late to recover if we
just catch the NPE where it happens, so we should early terminate the
call by adding TextUtil.isEmpty(pin) check.
Change-Id: Id280cd1b8781678540c9ea281b3186edd04d61f9
Fixes: 31895774
Test: make RunSettingsRoboTests
Test: manually enter correct/wrong/empty password/pin in confirm lock UI
(cherry picked from commit 774e1d8443
)
This commit is contained in:
@@ -320,11 +320,15 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mPasswordEntryInputDisabler.setInputEnabled(false);
|
|
||||||
|
|
||||||
final String pin = mPasswordEntry.getText().toString();
|
final String pin = mPasswordEntry.getText().toString();
|
||||||
|
if (TextUtils.isEmpty(pin)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mPasswordEntryInputDisabler.setInputEnabled(false);
|
||||||
final boolean verifyChallenge = getActivity().getIntent().getBooleanExtra(
|
final boolean verifyChallenge = getActivity().getIntent().getBooleanExtra(
|
||||||
ChooseLockSettingsHelper.EXTRA_KEY_HAS_CHALLENGE, false);
|
ChooseLockSettingsHelper.EXTRA_KEY_HAS_CHALLENGE, false);
|
||||||
|
|
||||||
Intent intent = new Intent();
|
Intent intent = new Intent();
|
||||||
if (verifyChallenge) {
|
if (verifyChallenge) {
|
||||||
if (isInternalActivity()) {
|
if (isInternalActivity()) {
|
||||||
|
Reference in New Issue
Block a user