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

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

Merge "Change getMaxConnectedAudioDevices() to public"

am: 5c931787

Change-Id: Iba1f94fa7256d2eefd059ded8c72397e7813ddad
parents f4ca0771 5c931787
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -2020,12 +2020,6 @@ public class AdapterService extends Service {
        return deviceProp.getBatteryLevel();
    }

    int getMaxConnectedAudioDevices() {
        enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");

        return mAdapterProperties.getMaxConnectedAudioDevices();
    }

    boolean setPin(BluetoothDevice device, boolean accept, int len, byte[] pinCode) {
        enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH ADMIN permission");
        DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device);
@@ -2235,6 +2229,16 @@ public class AdapterService extends Service {
        return mAdapterProperties.getLeMaximumAdvertisingDataLength();
    }

    /**
     * Get the maximum number of connected audio devices.
     *
     * @return the maximum number of connected audio devices
     */
    public int getMaxConnectedAudioDevices() {
        enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
        return mAdapterProperties.getMaxConnectedAudioDevices();
    }

    private BluetoothActivityEnergyInfo reportActivityInfo() {
        enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED, "Need BLUETOOTH permission");
        if (mAdapterProperties.getState() != BluetoothAdapter.STATE_ON