diff options
author | Chienyuan <chienyuanhuang@google.com> | 2019-07-09 15:09:56 +0800 |
---|---|---|
committer | Arjun Garg <arjgarg@google.com> | 2019-07-26 14:53:09 -0700 |
commit | 3568834a79704b884dc8e6e0d250bab01823cef4 (patch) | |
tree | 776800be4077b80bea0d98b9b79577fcfcfb41a3 | |
parent | b8b11c7913dd2587187176568a87d3c0642c1c38 (diff) | |
download | base-3568834a79704b884dc8e6e0d250bab01823cef4.tar.gz |
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
(cherry picked from commit 830217f277e31e63d9ab8acd21ee2a8f81ee1c8f)
-rwxr-xr-x | packages/SettingsLib/src/com/android/settingslib/bluetooth/HidProfile.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidProfile.java index a9e8db599177..fb6a990a29fd 100755 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidProfile.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HidProfile.java @@ -121,7 +121,7 @@ public final class HidProfile implements LocalBluetoothProfile { 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) { |