Commit 67c4f9f8 authored by Jeremy Klein's avatar Jeremy Klein Committed by Commit Bot

Offer BT logs for SmartLock and InstantTether feedback.

Currently the feedback dialog offers to let users include HCI
logs in feedback when "Bluetooth" or other related keywords are
included in the description. This change adds Smart Lock and
Tether(ing) to that potential list of related keywords. This
should let us get much more useful logs for errors related to these
features.

R=rkc@chromium.com

Bug: None
Change-Id: Ie70cdd2f1d29e9f4fa6cb823d2ac806e386d4975
Reviewed-on: https://chromium-review.googlesource.com/1237391Reviewed-by: default avatarRahul Chaturvedi <rkc@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Jeremy Klein <jlklein@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593048}
parent 5629377f
......@@ -99,6 +99,20 @@ const cantConnectRegEx = new RegExp(
'|((connect|pair).*(headphone|keyboard|mouse|speaker))',
'i');
/**
* Regular expression to check for "tether" or "tethering". Case insensitive
* matching.
* @type {RegExp}
*/
const tetherRegEx = new RegExp('tether(ing)?', 'i');
/**
* Regular expression to check for "Smart (Un)lock" or "Easy (Un)lock" with or
* without space between the words. Case insensitive matching.
* @type {RegExp}
*/
const smartLockRegEx = new RegExp('(smart|easy)[ ]?(un)?lock', 'i');
/**
* The callback used by the sys_info_page to receive the event that the system
* information is ready.
......@@ -187,7 +201,9 @@ function openSlowTraceWindow() {
*/
function checkForBluetoothKeywords(inputEvent) {
var isRelatedToBluetooth = btRegEx.test(inputEvent.target.value) ||
cantConnectRegEx.test(inputEvent.target.value);
cantConnectRegEx.test(inputEvent.target.value) ||
tetherRegEx.test(inputEvent.target.value) ||
smartLockRegEx.test(inputEvent.target.value);
$('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