Change GATT_FAILURE from 0 to 0x101

GATT_FAILURE 0 clashes with GATT_SUCCESS. For now, they represent different
kind of faiure. One for Gatt operation, one for Gatt registration. But we
should separate them as good practice.
bug 9109238

Change-Id: I686bb6004bc8831aa3e3bbffe2f7c8e24412e3c3
This commit is contained in:
Matthew Xie
2013-05-23 17:39:35 -07:00
parent 83d6df27d4
commit 8310e6196f
2 changed files with 4 additions and 4 deletions

View File

@@ -4923,7 +4923,7 @@ package android.bluetooth {
method public boolean setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic, boolean);
method public boolean writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic);
method public boolean writeDescriptor(android.bluetooth.BluetoothGattDescriptor);
field public static final int GATT_FAILURE = 0; // 0x0
field public static final int GATT_FAILURE = 257; // 0x101
field public static final int GATT_INSUFFICIENT_AUTHENTICATION = 5; // 0x5
field public static final int GATT_INSUFFICIENT_ENCRYPTION = 15; // 0xf
field public static final int GATT_INVALID_ATTRIBUTE_LENGTH = 13; // 0xd

View File

@@ -70,9 +70,6 @@ public final class BluetoothGatt implements BluetoothProfile {
private List<BluetoothGattService> mServices;
/** A GATT operation failed */
public static final int GATT_FAILURE = 0;
/** A GATT operation completed successfully */
public static final int GATT_SUCCESS = 0;
@@ -97,6 +94,9 @@ public final class BluetoothGatt implements BluetoothProfile {
/** A write operation exceeds the maximum length of the attribute */
public static final int GATT_INVALID_ATTRIBUTE_LENGTH = 0xd;
/** A GATT operation failed, errors other than the above */
public static final int GATT_FAILURE = 0x101;
/**
* No authentication required.
* @hide