Don't launch ConfirmDeviceCredentials multiple times.

Fixes bug 18724944

Change-Id: Ifd93b1632f120a2d17136b3100e2563fbb45b9a5
This commit is contained in:
Jim Miller
2015-07-20 15:36:21 -07:00
parent 4dd637a07e
commit 0c6e18f24d

View File

@@ -58,12 +58,15 @@ public class ConfirmDeviceCredentialActivity extends Activity {
String title = intent.getStringExtra(KeyguardManager.EXTRA_TITLE);
String details = intent.getStringExtra(KeyguardManager.EXTRA_DESCRIPTION);
ChooseLockSettingsHelper helper = new ChooseLockSettingsHelper(this);
if (!helper.launchConfirmationActivity(0 /* request code */, null /* title */, title,
details, false /* returnCredentials */, true /* isExternal */)) {
Log.d(TAG, "No pattern, password or PIN set.");
setResult(Activity.RESULT_OK);
finish();
// Ignore rotates and ensure we only launch this once
if (savedInstanceState == null) {
ChooseLockSettingsHelper helper = new ChooseLockSettingsHelper(this);
if (!helper.launchConfirmationActivity(0 /* request code */, null /* title */, title,
details, false /* returnCredentials */, true /* isExternal */)) {
Log.d(TAG, "No pattern, password or PIN set.");
setResult(Activity.RESULT_OK);
finish();
}
}
}