Merge changes from topic "bt_get_cod"
am: 35dc02004c
Change-Id: Iec67ef3cc9c990b4d5285b23b51972915cbbd335
This commit is contained in:
@@ -1133,6 +1133,28 @@ public final class BluetoothAdapter {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link BluetoothClass} Bluetooth Class of Device (CoD) of the local Bluetooth
|
||||
* adapter.
|
||||
*
|
||||
* @return {@link BluetoothClass} Bluetooth CoD of local Bluetooth device.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
|
||||
public BluetoothClass getBluetoothClass() {
|
||||
if (getState() != STATE_ON) return null;
|
||||
try {
|
||||
mServiceLock.readLock().lock();
|
||||
if (mService != null) return mService.getBluetoothClass();
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "", e);
|
||||
} finally {
|
||||
mServiceLock.readLock().unlock();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link BluetoothClass} Bluetooth Class of Device (CoD) of the local Bluetooth
|
||||
* adapter.
|
||||
|
||||
@@ -181,10 +181,18 @@
|
||||
android:name="android.bluetooth.a2dp-sink.profile.action.PLAYING_STATE_CHANGED" />
|
||||
<protected-broadcast
|
||||
android:name="android.bluetooth.a2dp-sink.profile.action.AUDIO_CONFIG_CHANGED" />
|
||||
<protected-broadcast
|
||||
android:name="android.bluetooth.avrcp-controller.profile.action.BROWSE_CONNECTION_STATE_CHANGED" />
|
||||
<protected-broadcast
|
||||
android:name="android.bluetooth.avrcp-controller.profile.action.CONNECTION_STATE_CHANGED" />
|
||||
<protected-broadcast
|
||||
android:name="android.bluetooth.avrcp-controller.profile.action.FOLDER_LIST" />
|
||||
<protected-broadcast
|
||||
android:name="android.bluetooth.avrcp-controller.profile.action.TRACK_EVENT" />
|
||||
<protected-broadcast
|
||||
android:name="android.bluetooth.input.profile.action.CONNECTION_STATE_CHANGED" />
|
||||
<protected-broadcast
|
||||
android:name="android.bluetooth.input.profile.action.IDLE_TIME_CHANGED" />
|
||||
<protected-broadcast
|
||||
android:name="android.bluetooth.input.profile.action.PROTOCOL_MODE_CHANGED" />
|
||||
<protected-broadcast
|
||||
|
||||
Reference in New Issue
Block a user