Skip to content
Snippets Groups Projects
Commit 8d4c318c authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi
Browse files

floss: Refactor allow_wake_by_hid for classic

Currently, allow_wake_by_hid tries to configure set event filter to
allow all classic devices that are HID major class to attempt connection
and wake us from suspend. This is insufficient to keep us from being
woken by unbonded devices (which we don't want).

The refactor does the following:
* Gets a list of classic hid devices (where DevClass matches either
  keyboard or pointing device).
* Program event filter using BD_ADDR instead of Class of Device
  filtering. Only bonded devices will be able to reconnect until we
  clear the Event Filter on resume.

Bug: 269835025
Tag: #floss
Test: Manual suspend test + autotest
Change-Id: I392bd63a8ebe0e8b7d53524dd24777b599ca8e41
parent 8b8b70f5
No related branches found
No related tags found
Loading
Showing
with 142 additions and 101 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment