Commit 33985cf8 authored by Qiyu Hu's avatar Qiyu Hu Committed by Commit Bot

Update the dbus error message for gatt in bluez

This was updated quite a while ago in bluez.
https://chromium.git.corp.google.com/chromiumos/third_party/bluez/+/48fe55b7610257bdb9ea075f1382440ae013be42%5E%21/#F0

Roll src/third_party/cros_system_api/ dea305b1a..62d5021bb (1 commit)
https://chromium.googlesource.com/chromiumos/platform/system_api.git/+log/dea305b1a70d..62d5021bb6d4

$ git log dea305b1a..62d5021bb --date=short --no-merges --format='%ad %ae %s'
2018-04-23 qiyuh Update gatt error message in dbus for bluez.

Created with:
  roll-dep src/third_party/cros_system_api

BUG=b:69965109
TEST=Pass CtsVerifier test on reading w/o permissions

Change-Id: Id0eb9122c02ca255ebbb50caf718d9020fd8d1ab
Reviewed-on: https://chromium-review.googlesource.com/1026075Reviewed-by: default avatarLuis Hector Chavez <lhchavez@chromium.org>
Reviewed-by: default avatarRahul Chaturvedi <rkc@chromium.org>
Commit-Queue: Qiyu Hu <qiyuh@google.com>
Cr-Commit-Position: refs/heads/master@{#553349}
parent 629da265
......@@ -504,7 +504,7 @@ deps = {
# For Linux and Chromium OS.
'src/third_party/cros_system_api': {
'url': Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + 'dea305b1a70d88d17d951dbe825a57fe2674ed23',
'url': Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + '62d5021bb6d4b23c3c92960dd021621b71e0924f',
'condition': 'checkout_linux',
},
......
......@@ -34,8 +34,7 @@ BluetoothGattServiceBlueZ::DBusErrorToServiceError(std::string error_name) {
code = GATT_ERROR_IN_PROGRESS;
} else if (error_name == bluetooth_gatt_service::kErrorInvalidValueLength) {
code = GATT_ERROR_INVALID_LENGTH;
} else if (error_name == bluetooth_gatt_service::kErrorReadNotPermitted ||
error_name == bluetooth_gatt_service::kErrorWriteNotPermitted) {
} else if (error_name == bluetooth_gatt_service::kErrorNotPermitted) {
code = GATT_ERROR_NOT_PERMITTED;
} else if (error_name == bluetooth_gatt_service::kErrorNotAuthorized) {
code = GATT_ERROR_NOT_AUTHORIZED;
......
......@@ -148,7 +148,7 @@ void FakeBluetoothGattCharacteristicClient::ReadValue(
}
if (object_path.value() == heart_rate_control_point_path_) {
error_callback.Run(bluetooth_gatt_service::kErrorReadNotPermitted,
error_callback.Run(bluetooth_gatt_service::kErrorNotPermitted,
"Reads of this value are not allowed");
return;
}
......@@ -226,7 +226,7 @@ void FakeBluetoothGattCharacteristicClient::WriteValue(
}
if (object_path.value() != heart_rate_control_point_path_) {
error_callback.Run(bluetooth_gatt_service::kErrorWriteNotPermitted,
error_callback.Run(bluetooth_gatt_service::kErrorNotPermitted,
"Writes of this value are not allowed");
return;
}
......
......@@ -138,7 +138,7 @@ void FakeBluetoothGattDescriptorClient::WriteValue(
// Since the only fake descriptor is "Client Characteristic Configuration"
// and BlueZ doesn't allow writing to it, return failure.
error_callback.Run(bluetooth_gatt_service::kErrorWriteNotPermitted,
error_callback.Run(bluetooth_gatt_service::kErrorNotPermitted,
"Writing to the Client Characteristic Configuration "
"descriptor not allowed");
}
......
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