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

Commit 429c7af5 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov
Browse files

Change getMaxConnectedAudioDevices() to public

The method should be public, otherwise it cannot be used within Bluetooth
itself.

Test: Code compilation
Bug: 64767509
Change-Id: I4e973fca924a9dfb91c363db4899587778a343a8
parent 719f0113
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