summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chienyuan <chienyuanhuang@google.com> 2019-07-09 15:09:56 +0800
committer Chienyuan <chienyuanhuang@google.com> 2019-07-09 15:09:56 +0800
commit830217f277e31e63d9ab8acd21ee2a8f81ee1c8f (patch)
tree13741159565afc6a89229a8a34b3b0ad4cd5e3f7
parentbab818fd4cfc3bd0138ce5180e32a5087b4e0280 (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-xpackages/SettingsLib/src/com/android/settingslib/bluetooth/HidProfile.java2
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) {