| 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 26f5f29acd03ba78535b841a286488d2905a5996..d1451258d4f4df1d81ebaf669dafb2fab9d30400 100644
|
| --- a/device/bluetooth/test/bluetooth_test_android.cc
|
| +++ b/device/bluetooth/test/bluetooth_test_android.cc
|
| @@ -86,18 +86,40 @@ void BluetoothTestAndroid::SimulateGattConnectionError(
|
| BluetoothDevice::ConnectErrorCode error) {
|
| int android_error_value = 0;
|
| switch (error) { // Constants are from android.bluetooth.BluetoothGatt.
|
| - case BluetoothDevice::ERROR_FAILED:
|
| - android_error_value = 0x00000101; // GATT_FAILURE
|
| + case BluetoothDevice::ERROR_ATTRIBUTE_LENGTH_INVALID:
|
| + android_error_value = 0x0000000d; // GATT_INVALID_ATTRIBUTE_LENGTH
|
| break;
|
| case BluetoothDevice::ERROR_AUTH_FAILED:
|
| android_error_value = 0x00000005; // GATT_INSUFFICIENT_AUTHENTICATION
|
| break;
|
| - case BluetoothDevice::ERROR_UNKNOWN:
|
| - case BluetoothDevice::ERROR_INPROGRESS:
|
| + case BluetoothDevice::ERROR_CONNECTION_CONGESTED:
|
| + android_error_value = 0x0000008f; // GATT_CONNECTION_CONGESTED
|
| + break;
|
| + case BluetoothDevice::ERROR_FAILED:
|
| + android_error_value = 0x00000101; // GATT_FAILURE
|
| + break;
|
| + case BluetoothDevice::ERROR_INSUFFICIENT_ENCRYPTION:
|
| + android_error_value = 0x0000000f; // GATT_INSUFFICIENT_ENCRYPTION
|
| + break;
|
| + case BluetoothDevice::ERROR_OFFSET_INVALID:
|
| + android_error_value = 0x00000007; // GATT_INVALID_OFFSET
|
| + break;
|
| + case BluetoothDevice::ERROR_READ_NOT_PERMITTED:
|
| + android_error_value = 0x00000002; // GATT_READ_NOT_PERMITTED
|
| + break;
|
| + case BluetoothDevice::ERROR_REQUEST_NOT_SUPPORTED:
|
| + android_error_value = 0x00000006; // GATT_REQUEST_NOT_SUPPORTED
|
| + break;
|
| + case BluetoothDevice::ERROR_WRITE_NOT_PERMITTED:
|
| + android_error_value = 0x00000003; // GATT_WRITE_NOT_PERMITTED
|
| + break;
|
| case BluetoothDevice::ERROR_AUTH_CANCELED:
|
| case BluetoothDevice::ERROR_AUTH_REJECTED:
|
| case BluetoothDevice::ERROR_AUTH_TIMEOUT:
|
| + case BluetoothDevice::ERROR_INPROGRESS:
|
| + case BluetoothDevice::ERROR_UNKNOWN:
|
| case BluetoothDevice::ERROR_UNSUPPORTED_DEVICE:
|
| + case BluetoothDevice::NUM_CONNECT_ERROR_CODES:
|
| NOTREACHED() << "No translation for error code: " << error;
|
| }
|
|
|
|
|