Loading api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -6185,10 +6185,14 @@ package android.bluetooth { method public boolean readCharacteristic(android.bluetooth.BluetoothGattCharacteristic); method public boolean readDescriptor(android.bluetooth.BluetoothGattDescriptor); method public boolean readRemoteRssi(); method public boolean requestConnectionParameterUpdate(int); 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_CONNECTION_BALANCED = 0; // 0x0 field public static final int GATT_CONNECTION_CONGESTED = 143; // 0x8f field public static final int GATT_CONNECTION_HIGH_PRIORITY = 1; // 0x1 field public static final int GATT_CONNECTION_LOW_POWER = 2; // 0x2 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 core/java/android/bluetooth/BluetoothGatt.java +52 −1 Original line number Diff line number Diff line Loading @@ -92,6 +92,25 @@ public final class BluetoothGatt implements BluetoothProfile { /** A GATT operation failed, errors other than the above */ public static final int GATT_FAILURE = 0x101; /** * Connection paramter update - Use the connection paramters recommended by the * Bluetooth SIG. This is the default value if no connection parameter update * is requested. */ public static final int GATT_CONNECTION_BALANCED = 0; /** * Connection paramter update - Request a high priority, low latency connection. * An application should only request high priority connection paramters to transfer * large amounts of data over LE quickly. Once the transfer is complete, the application * should request {@link BluetoothGatt#GATT_CONNECTION_BALANCED} connectoin parameters * to reduce energy use. */ public static final int GATT_CONNECTION_HIGH_PRIORITY = 1; /** Connection paramter update - Request low power, reduced data rate connection parameters. */ public static final int GATT_CONNECTION_LOW_POWER = 2; /** * No authentication required. * @hide Loading Loading @@ -738,7 +757,7 @@ public final class BluetoothGatt implements BluetoothProfile { * {@link BluetoothGattCallback#onConnectionStateChange} callback will be * invoked when the connection state changes as a result of this function. * * <p>The autoConnect paramter determines whether to actively connect to * <p>The autoConnect parameter determines whether to actively connect to * the remote device, or rather passively scan and finalize the connection * when the remote device is in range/available. Generally, the first ever * connection to a device should be direct (autoConnect set to false) and Loading Loading @@ -1286,6 +1305,38 @@ public final class BluetoothGatt implements BluetoothProfile { return true; } /** * Request a connection parameter update. * * <p>This function will send a connection parameter update request to the * remote device. * * @param connectionPriority Request a specific connection priority. Must be one of * {@link BluetoothGatt#GATT_CONNECTION_BALANCED}, * {@link BluetoothGatt#GATT_CONNECTION_HIGH_PRIORITY} * or {@link BluetoothGatt#GATT_CONNECTION_LOW_POWER}. * @throws IllegalArgumentException If the parameters are outside of their * specified range. */ public boolean requestConnectionParameterUpdate(int connectionPriority) { if (connectionPriority < GATT_CONNECTION_BALANCED || connectionPriority > GATT_CONNECTION_LOW_POWER) { throw new IllegalArgumentException("connectionPriority not within valid range"); } if (DBG) Log.d(TAG, "requestConnectionParameterUpdate() - params: " + connectionPriority); if (mService == null || mClientIf == 0) return false; try { mService.connectionParameterUpdate(mClientIf, mDevice.getAddress(), connectionPriority); } catch (RemoteException e) { Log.e(TAG,"",e); return false; } return true; } /** * Not supported - please use {@link BluetoothManager#getConnectedDevices(int)} * with {@link BluetoothProfile#GATT} as argument Loading core/java/android/bluetooth/IBluetoothGatt.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ interface IBluetoothGatt { void endReliableWrite(in int clientIf, in String address, in boolean execute); void readRemoteRssi(in int clientIf, in String address); void configureMTU(in int clientIf, in String address, in int mtu); void connectionParameterUpdate(in int clientIf, in String address, in int connectionPriority); void registerServer(in ParcelUuid appId, in IBluetoothGattServerCallback callback); void unregisterServer(in int serverIf); Loading Loading
api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -6185,10 +6185,14 @@ package android.bluetooth { method public boolean readCharacteristic(android.bluetooth.BluetoothGattCharacteristic); method public boolean readDescriptor(android.bluetooth.BluetoothGattDescriptor); method public boolean readRemoteRssi(); method public boolean requestConnectionParameterUpdate(int); 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_CONNECTION_BALANCED = 0; // 0x0 field public static final int GATT_CONNECTION_CONGESTED = 143; // 0x8f field public static final int GATT_CONNECTION_HIGH_PRIORITY = 1; // 0x1 field public static final int GATT_CONNECTION_LOW_POWER = 2; // 0x2 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
core/java/android/bluetooth/BluetoothGatt.java +52 −1 Original line number Diff line number Diff line Loading @@ -92,6 +92,25 @@ public final class BluetoothGatt implements BluetoothProfile { /** A GATT operation failed, errors other than the above */ public static final int GATT_FAILURE = 0x101; /** * Connection paramter update - Use the connection paramters recommended by the * Bluetooth SIG. This is the default value if no connection parameter update * is requested. */ public static final int GATT_CONNECTION_BALANCED = 0; /** * Connection paramter update - Request a high priority, low latency connection. * An application should only request high priority connection paramters to transfer * large amounts of data over LE quickly. Once the transfer is complete, the application * should request {@link BluetoothGatt#GATT_CONNECTION_BALANCED} connectoin parameters * to reduce energy use. */ public static final int GATT_CONNECTION_HIGH_PRIORITY = 1; /** Connection paramter update - Request low power, reduced data rate connection parameters. */ public static final int GATT_CONNECTION_LOW_POWER = 2; /** * No authentication required. * @hide Loading Loading @@ -738,7 +757,7 @@ public final class BluetoothGatt implements BluetoothProfile { * {@link BluetoothGattCallback#onConnectionStateChange} callback will be * invoked when the connection state changes as a result of this function. * * <p>The autoConnect paramter determines whether to actively connect to * <p>The autoConnect parameter determines whether to actively connect to * the remote device, or rather passively scan and finalize the connection * when the remote device is in range/available. Generally, the first ever * connection to a device should be direct (autoConnect set to false) and Loading Loading @@ -1286,6 +1305,38 @@ public final class BluetoothGatt implements BluetoothProfile { return true; } /** * Request a connection parameter update. * * <p>This function will send a connection parameter update request to the * remote device. * * @param connectionPriority Request a specific connection priority. Must be one of * {@link BluetoothGatt#GATT_CONNECTION_BALANCED}, * {@link BluetoothGatt#GATT_CONNECTION_HIGH_PRIORITY} * or {@link BluetoothGatt#GATT_CONNECTION_LOW_POWER}. * @throws IllegalArgumentException If the parameters are outside of their * specified range. */ public boolean requestConnectionParameterUpdate(int connectionPriority) { if (connectionPriority < GATT_CONNECTION_BALANCED || connectionPriority > GATT_CONNECTION_LOW_POWER) { throw new IllegalArgumentException("connectionPriority not within valid range"); } if (DBG) Log.d(TAG, "requestConnectionParameterUpdate() - params: " + connectionPriority); if (mService == null || mClientIf == 0) return false; try { mService.connectionParameterUpdate(mClientIf, mDevice.getAddress(), connectionPriority); } catch (RemoteException e) { Log.e(TAG,"",e); return false; } return true; } /** * Not supported - please use {@link BluetoothManager#getConnectedDevices(int)} * with {@link BluetoothProfile#GATT} as argument Loading
core/java/android/bluetooth/IBluetoothGatt.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ interface IBluetoothGatt { void endReliableWrite(in int clientIf, in String address, in boolean execute); void readRemoteRssi(in int clientIf, in String address); void configureMTU(in int clientIf, in String address, in int mtu); void connectionParameterUpdate(in int clientIf, in String address, in int connectionPriority); void registerServer(in ParcelUuid appId, in IBluetoothGattServerCallback callback); void unregisterServer(in int serverIf); Loading