Merge "Rename method isConnectable()"

This commit is contained in:
Leon Liao
2018-09-25 23:06:20 +00:00
committed by Gerrit Code Review
16 changed files with 18 additions and 18 deletions

View File

@@ -105,7 +105,7 @@ public class A2dpProfile implements LocalBluetoothProfile {
BluetoothProfile.A2DP);
}
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return true;
}

View File

@@ -99,7 +99,7 @@ final class A2dpSinkProfile implements LocalBluetoothProfile {
BluetoothProfile.A2DP_SINK);
}
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return true;
}

View File

@@ -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);
}
}

View File

@@ -106,7 +106,7 @@ public class HeadsetProfile implements LocalBluetoothProfile {
BluetoothProfile.HEADSET);
}
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return true;
}

View File

@@ -103,7 +103,7 @@ public class HearingAidProfile implements LocalBluetoothProfile {
BluetoothProfile.HEARING_AID);
}
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return false;
}

View File

@@ -107,7 +107,7 @@ final class HfpClientProfile implements LocalBluetoothProfile {
}
@Override
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return true;
}

View File

@@ -97,7 +97,7 @@ public class HidDeviceProfile implements LocalBluetoothProfile {
}
@Override
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return true;
}

View File

@@ -95,7 +95,7 @@ public class HidProfile implements LocalBluetoothProfile {
BluetoothProfile.HID_HOST);
}
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return true;
}

View File

@@ -26,9 +26,9 @@ import android.bluetooth.BluetoothDevice;
public interface LocalBluetoothProfile {
/**
* Returns true if the user can initiate a connection, false otherwise.
* Return {@code true} if the user can initiate a connection for this profile in UI.
*/
boolean isConnectable();
boolean accessProfileEnabled();
/**
* Returns true if the user can enable auto connection for this profile.

View File

@@ -108,7 +108,7 @@ public final class MapClientProfile implements LocalBluetoothProfile {
BluetoothProfile.MAP_CLIENT);
}
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return true;
}

View File

@@ -107,7 +107,7 @@ public class MapProfile implements LocalBluetoothProfile {
BluetoothProfile.MAP);
}
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return true;
}

View File

@@ -32,7 +32,7 @@ final class OppProfile implements LocalBluetoothProfile {
// Order of this profile in device profiles list
private static final int ORDINAL = 2;
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return false;
}

View File

@@ -80,7 +80,7 @@ public class PanProfile implements LocalBluetoothProfile {
BluetoothProfile.PAN);
}
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return true;
}

View File

@@ -110,7 +110,7 @@ public final class PbapClientProfile implements LocalBluetoothProfile {
BluetoothProfile.PBAP_CLIENT);
}
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return true;
}

View File

@@ -80,7 +80,7 @@ public class PbapServerProfile implements LocalBluetoothProfile {
BluetoothPbap pbap = new BluetoothPbap(context, new PbapServiceListener());
}
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return true;
}

View File

@@ -106,7 +106,7 @@ final class SapProfile implements LocalBluetoothProfile {
BluetoothProfile.SAP);
}
public boolean isConnectable() {
public boolean accessProfileEnabled() {
return true;
}