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

Commit d63ef1ec authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add IntDef for the return value of BluetoothAdapter#notifyActiveDeviceChangeApplied"

parents 33ff7c32 5b5d4d23
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -5217,6 +5217,18 @@ public final class BluetoothAdapter {
        return defaultValue;
    }

    /** @hide */
    @Retention(RetentionPolicy.SOURCE)
    @IntDef(value = {
            BluetoothStatusCodes.SUCCESS,
            BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED,
            BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ALLOWED,
            BluetoothStatusCodes.ERROR_DEVICE_NOT_BONDED,
            BluetoothStatusCodes.ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION,
            BluetoothStatusCodes.ERROR_UNKNOWN
    })
    public @interface NotifyActiveDeviceChangeAppliedReturnValues {}

    /**
     * Called by audio framework to inform the Bluetooth stack that an active device change has
     * taken effect. If this active device change is triggered by an app calling
@@ -5239,6 +5251,7 @@ public final class BluetoothAdapter {
            android.Manifest.permission.BLUETOOTH_CONNECT,
            android.Manifest.permission.BLUETOOTH_PRIVILEGED,
    })
    @NotifyActiveDeviceChangeAppliedReturnValues
    public int notifyActiveDeviceChangeApplied(@NonNull BluetoothDevice device) {
        if (DBG) Log.d(TAG, "notifyActiveDeviceChangeApplied(" + device + ")");
        Objects.requireNonNull(device, "device cannot be null");