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

Commit 5c931787 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by Gerrit Code Review
Browse files

Merge "Change getMaxConnectedAudioDevices() to public"

parents 7aee7160 429c7af5
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