Commit 924da3ba authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

cros: Fix regression with pin message persistent in confirm stage.

Partial reverted the cl which introduced this regression. I will reopen
the original bug and try a better fix later.

Test: manual
Bug: 881756, 907002
Change-Id: Idbe3a587caad485968d78b0b4841f1bfa0105366
Reviewed-on: https://chromium-review.googlesource.com/c/1344221Reviewed-by: default avatarAlexander Alekseev <alemate@chromium.org>
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611517}
parent d5684ffe
......@@ -237,12 +237,11 @@ Polymer({
* Processes the message received from the quick unlock api and hides/shows
* the problem based on the message.
* @private
* @param {string} newPin
* @param {chrome.quickUnlockPrivate.CredentialCheck} message The message
* received from checkCredential.
*/
processPinProblems_: function(newPin, message) {
if (newPin && !message.errors.length && !message.warnings.length) {
processPinProblems_: function(message) {
if (!message.errors.length && !message.warnings.length) {
this.hideProblem_();
this.enableSubmit = true;
this.pinHasPassedMinimumLength_ = true;
......@@ -281,9 +280,6 @@ Polymer({
break;
}
}
if (!newPin)
this.enableSubmit = false;
},
/**
......@@ -292,13 +288,13 @@ Polymer({
onPinChange_: function(e) {
const newPin = /** @type {{pin: string}} */ (e.detail).pin;
if (!this.isConfirmStep) {
if (this.quickUnlockPrivate) {
if (newPin) {
this.quickUnlockPrivate.checkCredential(
chrome.quickUnlockPrivate.QuickUnlockMode.PIN, newPin,
this.processPinProblems_.bind(this, newPin));
}
if (!newPin)
this.processPinProblems_.bind(this));
} else {
this.enableSubmit = false;
}
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment