Commit 29e6b1f7 authored by Ryan Hansberry's avatar Ryan Hansberry Committed by Commit Bot

[Bluetooth] Present user-friendly string on unknownError while pairing.

Bug: 954347
Change-Id: I36aa7aaef7f907d5529c50aaf618fd6c85f40636
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1574486Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Ryan Hansberry <hansberry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652911}
parent e7316d0a
......@@ -137,13 +137,15 @@ Polymer({
}
const name = device.name || device.address;
const id = 'bluetooth_connect_' + error;
if (this.i18nExists(id)) {
this.errorMessage_ = this.i18n(id, name);
} else {
this.errorMessage_ = error;
console.error('Unexpected error connecting to: ' + name + ': ' + error);
let id = 'bluetooth_connect_' + error;
if (!this.i18nExists(id)) {
console.error(
'Unexpected error connecting to:', name, 'error:', error,
'result:', result);
id = 'bluetooth_connect_failed';
}
this.errorMessage_ = this.i18n(id, name);
return true;
},
......
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