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

Commit b510e785 authored by Prashanth Swaminathan's avatar Prashanth Swaminathan
Browse files

Don't set mFdEvents if looper fd update fails

While it should not happen in practice, it's possible that adding or
removing the fd from the message queue's looper could fail. Setting
`mFdEvents` to `events` in this case can cause the event receiver and
the looper to go out of sync.

If either the add or remove operations return -1, skip the update so
that we at least remain consistent, albiet in a bad state.

Bug: 416266715
Test: atest InputEventSenderAndReceiverTest
Flag: EXEMPT bugfix
Change-Id: I069f7269e563aff2abf62598200f5275c2e612a4
parent cf58d6b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment