Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1805)

Unified Diff: device/bluetooth/test/bluetooth_test_android.cc

Issue 1464443002: bluetooth: android: Add BluetoothDevice::ConnectErrorCode enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: II Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/test/bluetooth_test_android.cc
diff --git a/device/bluetooth/test/bluetooth_test_android.cc b/device/bluetooth/test/bluetooth_test_android.cc
index 3e9d83ffaf4be1e95a644c56e73a212c97342d2c..fe5a6cc5e620efcfa269c8ec314d4cc9ff3ffc6f 100644
--- a/device/bluetooth/test/bluetooth_test_android.cc
+++ b/device/bluetooth/test/bluetooth_test_android.cc
@@ -89,9 +89,30 @@ void BluetoothTestAndroid::SimulateGattConnectionError(
case BluetoothDevice::ERROR_FAILED:
scheib 2015/11/24 01:30:48 Please sort into two groups ordered BluetoothDevic
Kai Jiang 2015/11/25 14:17:13 Done.
android_error_value = 0x00000101; // GATT_FAILURE
break;
+ case BluetoothDevice::ERROR_CONNECTION_CONGESTED:
+ android_error_value = 0x0000008f; // GATT_CONNECTION_CONGESTED
+ break;
+ case BluetoothDevice::ERROR_INSUFFICIENT_ENCRYPTION:
+ android_error_value = 0x0000000f; // GATT_INSUFFICIENT_ENCRYPTION
+ break;
+ case BluetoothDevice::ERROR_ATTRIBUTE_LENGTH_INVALID:
+ android_error_value = 0x0000000d; // GATT_INVALID_ATTRIBUTE_LENGTH
+ break;
+ case BluetoothDevice::ERROR_OFFSET_INVALID:
+ android_error_value = 0x00000007; // GATT_INVALID_OFFSET
+ break;
+ case BluetoothDevice::ERROR_REQUEST_NOT_SUPPORTED:
+ android_error_value = 0x00000006; // GATT_REQUEST_NOT_SUPPORTED
+ break;
case BluetoothDevice::ERROR_AUTH_FAILED:
android_error_value = 0x00000005; // GATT_INSUFFICIENT_AUTHENTICATION
break;
+ case BluetoothDevice::ERROR_WRITE_FAILED:
+ android_error_value = 0x00000003; // GATT_WRITE_NOT_PERMITTED
+ break;
+ case BluetoothDevice::ERROR_READ_FAILED:
+ android_error_value = 0x00000002; // GATT_READ_NOT_PERMITTED
+ break;
case BluetoothDevice::ERROR_UNKNOWN:
case BluetoothDevice::ERROR_INPROGRESS:
case BluetoothDevice::ERROR_AUTH_CANCELED:

Powered by Google App Engine
This is Rietveld 408576698