Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5b1a6ca authored by Hyundo Moon's avatar Hyundo Moon Committed by Automerger Merge Worker
Browse files

Merge "BluetoothGatt: Deprecate unsupported methods" am: d66cd673 am: 2984d48f am: 9b0b7ff1

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1899033

Change-Id: I171735ba4e583455c3070f30662bf505cd4facc3
parents 1417738e 9b0b7ff1
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1806,32 +1806,33 @@ public final class BluetoothGatt implements BluetoothProfile {
    }

    /**
     * Not supported - please use {@link BluetoothManager#getConnectedDevices(int)}
     * @deprecated Not supported - please use {@link BluetoothManager#getConnectedDevices(int)}
     * with {@link BluetoothProfile#GATT} as argument
     *
     * @throws UnsupportedOperationException
     */
    @Override
    @RequiresNoPermission
    @Deprecated
    public int getConnectionState(BluetoothDevice device) {
        throw new UnsupportedOperationException("Use BluetoothManager#getConnectionState instead.");
    }

    /**
     * Not supported - please use {@link BluetoothManager#getConnectedDevices(int)}
     * @deprecated Not supported - please use {@link BluetoothManager#getConnectedDevices(int)}
     * with {@link BluetoothProfile#GATT} as argument
     *
     * @throws UnsupportedOperationException
     */
    @Override
    @RequiresNoPermission
    @Deprecated
    public List<BluetoothDevice> getConnectedDevices() {
        throw new UnsupportedOperationException(
                "Use BluetoothManager#getConnectedDevices instead.");
    }

    /**
     * Not supported - please use
     * @deprecated Not supported - please use
     * {@link BluetoothManager#getDevicesMatchingConnectionStates(int, int[])}
     * with {@link BluetoothProfile#GATT} as first argument
     *
@@ -1839,6 +1840,7 @@ public final class BluetoothGatt implements BluetoothProfile {
     */
    @Override
    @RequiresNoPermission
    @Deprecated
    public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
        throw new UnsupportedOperationException(
                "Use BluetoothManager#getDevicesMatchingConnectionStates instead.");