Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Chienyuan committed Jul 9, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
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
@@ -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) {

0 comments on commit 830217f

Please sign in to comment.