diff options
| author | 2019-07-09 15:09:56 +0800 | |
|---|---|---|
| committer | 2019-07-09 15:09:56 +0800 | |
| commit | 830217f277e31e63d9ab8acd21ee2a8f81ee1c8f (patch) | |
| tree | 13741159565afc6a89229a8a34b3b0ad4cd5e3f7 | |
| parent | bab818fd4cfc3bd0138ce5180e32a5087b4e0280 (diff) | |
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
| -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) { |