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

Commit 7568b012 authored by Alice Kuo's avatar Alice Kuo
Browse files

Rename function checkifAllProfilesAreUnknown to isAllProfilesUnknown

Readability improvement

Bug: 279366294
Test: disable le audio toggle, and then connect/disconnect device
Change-Id: Ia2411e496ca53f865a8665ddc101cbdf823a860b
parent 77772eaf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1427,7 +1427,7 @@ public class AdapterService extends Service {
     * @return false if one of profile is enabled or disabled, true otherwise
     */
    @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED)
    boolean checkifAllProfilesAreUnknown(BluetoothDevice device) {
    boolean isAllProfilesUnknown(BluetoothDevice device) {
        if (mA2dpService != null && mA2dpService.getConnectionPolicy(device)
                != BluetoothProfile.CONNECTION_POLICY_UNKNOWN) {
            return false;
@@ -5626,7 +5626,7 @@ public class AdapterService extends Service {
        }

        // Checks if any profiles are enablde or disabled and if so, only connect enabled profiles
        if (!checkifAllProfilesAreUnknown(device)) {
        if (!isAllProfilesUnknown(device)) {
            return connectEnabledProfiles(device);
        }

+1 −1
Original line number Diff line number Diff line
@@ -1140,7 +1140,7 @@ final class RemoteDevices {
                }
                resetBatteryLevel(device);
            }
            if (mAdapterService.checkifAllProfilesAreUnknown(device)) {
            if (mAdapterService.isAllProfilesUnknown(device)) {
                DeviceProperties deviceProp = getDeviceProperties(device);
                if (deviceProp != null) {
                    deviceProp.setBondingInitiatedLocally(false);