1.目录变化
Android13,由frameworks/base/core/java/android/bluetooth 变为 packages/modules/Bluetooth/framework/java/android/bluetooth
public boolean setScanMode(@ScanMode int mode) {}
变为
public int setScanMode(@ScanMode int mode) {}
方法变化:
从Android 11 开始
Profile如:BluetoothA2dp增加了
public boolean setConnectionPolicy(@NonNull BluetoothDevice device, @ConnectionPolicy int connectionPolicy)
public @ConnectionPolicy int getConnectionPolicy(@NonNull BluetoothDevice device)
下面的setPriority与getPriority最终是通过setConnectionPolicy与getConnectionPolicy的数据转换而来。
public boolean setPriority(BluetoothDevice device, int priority)
public int getPriority(BluetoothDevice device)
Android 9 开始
BluetoothInputDevice.java 变为 BluetoothHidHost.java
BluetoothProfile.INPUT_DEVICE 变为 BluetoothProfile.HID_HOST