Commit baadb045 authored by Adam Langley's avatar Adam Langley Committed by Commit Bot

webauthn: do FCM-triggered caBLE handshake in background.

Previously, an FCM message would trigger a notification which, when
pressed, would start the caBLE handshake. This caused every paired
device to show the notification, whether in range or not.

With this change, the caBLE handshaking happens in the background and
only if everything is working will the notification be shown.

BUG=1002262

Change-Id: I16c906342e0567c5de7eb7c42ee5060616f8c675
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2500277
Commit-Queue: Adam Langley <agl@chromium.org>
Reviewed-by: default avatarMartin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/master@{#822818}
parent 5e7a024b
...@@ -128,7 +128,7 @@ class CableAuthenticator { ...@@ -128,7 +128,7 @@ class CableAuthenticator {
if (isFcmNotification) { if (isFcmNotification) {
// The user tapped a notification that resulted from an FCM message. // The user tapped a notification that resulted from an FCM message.
CableAuthenticatorJni.get().startFCM(this); CableAuthenticatorJni.get().onInteractionReady(this);
} }
// Otherwise wait for a QR scan. // Otherwise wait for a QR scan.
...@@ -552,11 +552,10 @@ class CableAuthenticator { ...@@ -552,11 +552,10 @@ class CableAuthenticator {
CableAuthenticator cableAuthenticator, String authenticatorName, String qrUrl); CableAuthenticator cableAuthenticator, String authenticatorName, String qrUrl);
/** /**
* Called to instruct the C++ code to start a new transaction based on a cloud message * Called after the notification created by {@link showNotification} has been pressed and
* because the user tapped the notification that was shown because |showNotification| was * the {@link CableAuthenticatorUI} Fragment is now in the foreground for showing UI.
* called.
*/ */
void startFCM(CableAuthenticator cableAuthenticator); void onInteractionReady(CableAuthenticator cableAuthenticator);
/** /**
* Called to alert the C++ code to stop any ongoing transactions. * Called to alert the C++ code to stop any ongoing transactions.
......
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