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({ ...@@ -237,12 +237,11 @@ Polymer({
* Processes the message received from the quick unlock api and hides/shows * Processes the message received from the quick unlock api and hides/shows
* the problem based on the message. * the problem based on the message.
* @private * @private
* @param {string} newPin
* @param {chrome.quickUnlockPrivate.CredentialCheck} message The message * @param {chrome.quickUnlockPrivate.CredentialCheck} message The message
* received from checkCredential. * received from checkCredential.
*/ */
processPinProblems_: function(newPin, message) { processPinProblems_: function(message) {
if (newPin && !message.errors.length && !message.warnings.length) { if (!message.errors.length && !message.warnings.length) {
this.hideProblem_(); this.hideProblem_();
this.enableSubmit = true; this.enableSubmit = true;
this.pinHasPassedMinimumLength_ = true; this.pinHasPassedMinimumLength_ = true;
...@@ -281,9 +280,6 @@ Polymer({ ...@@ -281,9 +280,6 @@ Polymer({
break; break;
} }
} }
if (!newPin)
this.enableSubmit = false;
}, },
/** /**
...@@ -292,13 +288,13 @@ Polymer({ ...@@ -292,13 +288,13 @@ Polymer({
onPinChange_: function(e) { onPinChange_: function(e) {
const newPin = /** @type {{pin: string}} */ (e.detail).pin; const newPin = /** @type {{pin: string}} */ (e.detail).pin;
if (!this.isConfirmStep) { if (!this.isConfirmStep) {
if (this.quickUnlockPrivate) { if (newPin) {
this.quickUnlockPrivate.checkCredential( this.quickUnlockPrivate.checkCredential(
chrome.quickUnlockPrivate.QuickUnlockMode.PIN, newPin, chrome.quickUnlockPrivate.QuickUnlockMode.PIN, newPin,
this.processPinProblems_.bind(this, newPin)); this.processPinProblems_.bind(this));
} } else {
if (!newPin)
this.enableSubmit = false; this.enableSubmit = false;
}
return; 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