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

Commit 42037b29 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by android-build-merger
Browse files

Merge "Added internal API getMaxConnectedAudioDevices()" am: 9866e9aa am: 081b7f18

am: 32a5ebf4

Change-Id: I55d0175bb715dbd28176032ace129a2c85a218f0
parents dc24edfc 32a5ebf4
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -1674,6 +1674,27 @@ public final class BluetoothAdapter {
        return 0;
    }

    /**
     * Get the maximum number of connected audio devices.
     *
     * @return the maximum number of connected audio devices
     * @hide
     */
    @RequiresPermission(Manifest.permission.BLUETOOTH)
    public int getMaxConnectedAudioDevices() {
        try {
            mServiceLock.readLock().lock();
            if (mService != null) {
                return mService.getMaxConnectedAudioDevices();
            }
        } catch (RemoteException e) {
            Log.e(TAG, "failed to get getMaxConnectedAudioDevices, error: ", e);
        } finally {
            mServiceLock.readLock().unlock();
        }
        return 1;
    }

    /**
     * Return true if hardware has entries available for matching beacons
     *