HidProfile: sync isPreferred() with HidHostService
HidHostService allow to connect when priority is PRIORITY_UNDEFINED. HidProfile should return ture when priority is PRIORITY_UNDEFINED. Otherwise, the "Input device" toggle in off state when HID device connected. Bug: 132456322 Test: manual Change-Id: Id7bae694c57aec17e019d591c0a677e3cb64f845
This commit is contained in:
@@ -121,7 +121,7 @@ public final class HidProfile implements LocalBluetoothProfile {
|
|||||||
|
|
||||||
public boolean isPreferred(BluetoothDevice device) {
|
public boolean isPreferred(BluetoothDevice device) {
|
||||||
if (mService == null) return false;
|
if (mService == null) return false;
|
||||||
return mService.getPriority(device) > BluetoothProfile.PRIORITY_OFF;
|
return mService.getPriority(device) != BluetoothProfile.PRIORITY_OFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPreferred(BluetoothDevice device) {
|
public int getPreferred(BluetoothDevice device) {
|
||||||
|
|||||||
Reference in New Issue
Block a user