Skip to content

Commit

Permalink
HidProfile: sync isPreferred() with HidHostService
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Chienyuan committed Jul 9, 2019
1 parent bab818f commit 830217f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public int getConnectionStatus(BluetoothDevice device) {

public boolean isPreferred(BluetoothDevice device) {
if (mService == null) return false;
return mService.getPriority(device) > BluetoothProfile.PRIORITY_OFF;
return mService.getPriority(device) != BluetoothProfile.PRIORITY_OFF;
}

public int getPreferred(BluetoothDevice device) {
Expand Down

0 comments on commit 830217f

Please sign in to comment.