diff options
3 files changed, 5 insertions, 7 deletions
diff --git a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc index 71a03c8..61bbb8d 100644 --- a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc +++ b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc @@ -149,7 +149,7 @@ void FakeBluetoothGattCharacteristicClient::ReadValue( } if (object_path.value() == heart_rate_control_point_path_) { - error_callback.Run("org.bluez.Error.ReadNotPermitted", + error_callback.Run("org.bluez.Error.NotPermitted", "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("org.bluez.Error.WriteNotPermitted", + error_callback.Run("org.bluez.Error.NotPermitted", "Writes of this value are not allowed"); return; } diff --git a/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.cc b/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.cc index f1f30f5..5ff9bf4 100644 --- a/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.cc +++ b/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.cc @@ -136,7 +136,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("org.bluez.Error.WriteNotPermitted", + error_callback.Run("org.bluez.Error.NotPermitted", "Writing to the Client Characteristic Configuration " "descriptor not allowed"); } diff --git a/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc b/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc index bd243d8..cea23ec 100644 --- a/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc +++ b/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc @@ -24,8 +24,7 @@ const char kErrorInvalidValueLength[] = "org.bluez.Error.InvalidValueLength"; const char kErrorNotAuthorized[] = "org.bluez.Error.NotAuthorized"; const char kErrorNotPaired[] = "org.bluez.Error.NotPaired"; const char kErrorNotSupported[] = "org.bluez.Error.NotSupported"; -const char kErrorReadNotPermitted[] = "org.bluez.Error.ReadNotPermitted"; -const char kErrorWriteNotPermitted[] = "org.bluez.Error.WriteNotPermitted"; +const char kErrorNotPermitted[] = "org.bluez.Error.NotPermitted"; } // namespace @@ -166,8 +165,7 @@ BluetoothRemoteGattServiceChromeOS::DBusErrorToServiceError( code = GATT_ERROR_IN_PROGRESS; } else if (error_name == kErrorInvalidValueLength) { code = GATT_ERROR_INVALID_LENGTH; - } else if (error_name == kErrorReadNotPermitted || - error_name == kErrorWriteNotPermitted) { + } else if (error_name == kErrorNotPermitted) { code = GATT_ERROR_NOT_PERMITTED; } else if (error_name == kErrorNotAuthorized) { code = GATT_ERROR_NOT_AUTHORIZED; |