Commit 9063b23e authored by Sonny Sasaka's avatar Sonny Sasaka Committed by Chromium LUCI CQ

feedback: Add Nearby Sharing-related keywords to show Bluetooth logs opt-in checkbox

This lets Googler users who report issues related to Nearby Share or
Phone Hub to attach Bluetooth logs.

Bug: b:177249078
Change-Id: Ib35ed5cb6d1a20421d5772a0b2a63b2553599e30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622523
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarRyan Hansberry <hansberry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842679}
parent aebc4178
...@@ -82,6 +82,14 @@ const tetherRegEx = new RegExp('tether(ing)?', 'i'); ...@@ -82,6 +82,14 @@ const tetherRegEx = new RegExp('tether(ing)?', 'i');
*/ */
const smartLockRegEx = new RegExp('(smart|easy)[ ]?(un)?lock', 'i'); const smartLockRegEx = new RegExp('(smart|easy)[ ]?(un)?lock', 'i');
/**
* Regular expression to check for keywords related to Nearby Share like
* "nearby (share)" or "phone (hub)".
* Case insensitive matching.
* @type {RegExp}
*/
const nearbyShareRegEx = new RegExp('nearby|phone', 'i');
/** /**
* The callback used by the sys_info_page to receive the event that the system * The callback used by the sys_info_page to receive the event that the system
* information is ready. * information is ready.
...@@ -172,7 +180,8 @@ function checkForBluetoothKeywords(inputEvent) { ...@@ -172,7 +180,8 @@ function checkForBluetoothKeywords(inputEvent) {
const isRelatedToBluetooth = btRegEx.test(inputEvent.target.value) || const isRelatedToBluetooth = btRegEx.test(inputEvent.target.value) ||
cantConnectRegEx.test(inputEvent.target.value) || cantConnectRegEx.test(inputEvent.target.value) ||
tetherRegEx.test(inputEvent.target.value) || tetherRegEx.test(inputEvent.target.value) ||
smartLockRegEx.test(inputEvent.target.value); smartLockRegEx.test(inputEvent.target.value) ||
nearbyShareRegEx.test(inputEvent.target.value);
$('bluetooth-checkbox-container').hidden = !isRelatedToBluetooth; $('bluetooth-checkbox-container').hidden = !isRelatedToBluetooth;
} }
......
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