Commit 0c1b242b authored by Chris Mumford's avatar Chris Mumford Committed by Chromium LUCI CQ

[Bluetooth] "not supported" → "not permitted" for non-readable characteristics.

Switch the exception message from "GATT Error: Not supported." to
"GATT operation not permitted." when attempting to read a non-readable
characteristic on macOS.

The former is more descriptive, as Web Bluetooth does support reading
characteristics, and also aligns with other platform behaviors,
e.g. Windows and Linux, which currently set the "... not permitted."
message.

Bug: none
Change-Id: I0023a5ddd35d5783cec253e3a935c295804f731b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2633646
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844844}
parent a1a3f955
......@@ -136,7 +136,7 @@ void BluetoothRemoteGattCharacteristicMac::ReadRemoteCharacteristic(
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::BindOnce(std::move(error_callback),
BluetoothRemoteGattService::GATT_ERROR_NOT_SUPPORTED));
BluetoothRemoteGattService::GATT_ERROR_NOT_PERMITTED));
return;
}
if (HasPendingRead() || HasPendingWrite()) {
......
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