Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit daba8f83 authored by Chienyuan's avatar Chienyuan Committed by Arjun Garg
Browse files

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 830217f2)
parent dd56d82c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ public 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) {