Make BluetoothPan implement BluetoothProfile.
This makes it consistent across all other profiles. Change-Id: I4c0694d042d7ed1b78c92ca3be38c8d543886769
This commit is contained in:
@@ -736,12 +736,22 @@ abstract class LocalBluetoothProfileManager {
|
||||
}
|
||||
}
|
||||
|
||||
private static class PanProfileManager extends LocalBluetoothProfileManager {
|
||||
private final BluetoothPan mService;
|
||||
private static class PanProfileManager extends LocalBluetoothProfileManager
|
||||
implements BluetoothProfile.ServiceListener {
|
||||
private BluetoothPan mService;
|
||||
|
||||
public PanProfileManager(LocalBluetoothManager localManager) {
|
||||
super(localManager);
|
||||
mService = new BluetoothPan(localManager.getContext());
|
||||
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
|
||||
adapter.getProfileProxy(localManager.getContext(), this, BluetoothProfile.PAN);
|
||||
}
|
||||
|
||||
public void onServiceConnected(int profile, BluetoothProfile proxy) {
|
||||
mService = (BluetoothPan) proxy;
|
||||
}
|
||||
|
||||
public void onServiceDisconnected(int profile) {
|
||||
mService = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -799,7 +809,7 @@ abstract class LocalBluetoothProfileManager {
|
||||
|
||||
@Override
|
||||
public int getConnectionStatus(BluetoothDevice device) {
|
||||
return convertState(mService.getPanDeviceState(device));
|
||||
return convertState(mService.getConnectionState(device));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user