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

Commit 3b5e6bd4 authored by Leon Liao's avatar Leon Liao
Browse files

Rename method isConnectable()

LocalBluetoothProfile.isConnectable() checks whether the user can initiate a connection
for a specific profile, not really whether the profile is connectable.

Change-Id: If6c6cd1554acf35db2460ea6ddb65148a7e86e45
Bug: 79982487
Test: build
parent 6e9ce1a2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ public class A2dpProfile implements LocalBluetoothProfile {
                BluetoothProfile.A2DP);
    }

    public boolean isConnectable() {
    public boolean accessProfileEnabled() {
        return true;
    }

+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ final class A2dpSinkProfile implements LocalBluetoothProfile {
                BluetoothProfile.A2DP_SINK);
    }

    public boolean isConnectable() {
    public boolean accessProfileEnabled() {
        return true;
    }

+2 −2
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>

        int preferredProfiles = 0;
        for (LocalBluetoothProfile profile : mProfiles) {
            if (connectAllProfiles ? profile.isConnectable() : profile.isAutoConnectable()) {
            if (connectAllProfiles ? profile.accessProfileEnabled() : profile.isAutoConnectable()) {
                if (profile.isPreferred(mDevice)) {
                    ++preferredProfiles;
                    connectInt(profile);
@@ -736,7 +736,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
        List<LocalBluetoothProfile> connectableProfiles =
                new ArrayList<LocalBluetoothProfile>();
        for (LocalBluetoothProfile profile : mProfiles) {
            if (profile.isConnectable()) {
            if (profile.accessProfileEnabled()) {
                connectableProfiles.add(profile);
            }
        }
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ public class HeadsetProfile implements LocalBluetoothProfile {
                BluetoothProfile.HEADSET);
    }

    public boolean isConnectable() {
    public boolean accessProfileEnabled() {
        return true;
    }

+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ public class HearingAidProfile implements LocalBluetoothProfile {
                BluetoothProfile.HEARING_AID);
    }

    public boolean isConnectable() {
    public boolean accessProfileEnabled() {
        return false;
    }

Loading