Merge "Rename method isConnectable()" am: e238a19aa5
am: 78e8da5e79
Change-Id: I05ddc13a985acd3fa02d4c12d5ca416be29492cc
This commit is contained in:
@@ -105,7 +105,7 @@ public class A2dpProfile implements LocalBluetoothProfile {
|
||||
BluetoothProfile.A2DP);
|
||||
}
|
||||
|
||||
public boolean isConnectable() {
|
||||
public boolean accessProfileEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ final class A2dpSinkProfile implements LocalBluetoothProfile {
|
||||
BluetoothProfile.A2DP_SINK);
|
||||
}
|
||||
|
||||
public boolean isConnectable() {
|
||||
public boolean accessProfileEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -249,7 +249,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);
|
||||
@@ -735,7 +735,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public class HeadsetProfile implements LocalBluetoothProfile {
|
||||
BluetoothProfile.HEADSET);
|
||||
}
|
||||
|
||||
public boolean isConnectable() {
|
||||
public boolean accessProfileEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ public class HearingAidProfile implements LocalBluetoothProfile {
|
||||
BluetoothProfile.HEARING_AID);
|
||||
}
|
||||
|
||||
public boolean isConnectable() {
|
||||
public boolean accessProfileEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ final class HfpClientProfile implements LocalBluetoothProfile {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isConnectable() {
|
||||
public boolean accessProfileEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public class HidDeviceProfile implements LocalBluetoothProfile {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isConnectable() {
|
||||
public boolean accessProfileEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ public class HidProfile implements LocalBluetoothProfile {
|
||||
BluetoothProfile.HID_HOST);
|
||||
}
|
||||
|
||||
public boolean isConnectable() {
|
||||
public boolean accessProfileEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -108,7 +108,7 @@ public final class MapClientProfile implements LocalBluetoothProfile {
|
||||
BluetoothProfile.MAP_CLIENT);
|
||||
}
|
||||
|
||||
public boolean isConnectable() {
|
||||
public boolean accessProfileEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ public class MapProfile implements LocalBluetoothProfile {
|
||||
BluetoothProfile.MAP);
|
||||
}
|
||||
|
||||
public boolean isConnectable() {
|
||||
public boolean accessProfileEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ public class PanProfile implements LocalBluetoothProfile {
|
||||
BluetoothProfile.PAN);
|
||||
}
|
||||
|
||||
public boolean isConnectable() {
|
||||
public boolean accessProfileEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ public final class PbapClientProfile implements LocalBluetoothProfile {
|
||||
BluetoothProfile.PBAP_CLIENT);
|
||||
}
|
||||
|
||||
public boolean isConnectable() {
|
||||
public boolean accessProfileEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ public class PbapServerProfile implements LocalBluetoothProfile {
|
||||
BluetoothPbap pbap = new BluetoothPbap(context, new PbapServiceListener());
|
||||
}
|
||||
|
||||
public boolean isConnectable() {
|
||||
public boolean accessProfileEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ final class SapProfile implements LocalBluetoothProfile {
|
||||
BluetoothProfile.SAP);
|
||||
}
|
||||
|
||||
public boolean isConnectable() {
|
||||
public boolean accessProfileEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user