-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…3046) Refer to the original PR: #3027 An integer overflow in a downconversion resulted in a negative timeout being used for the ALooper_pollAll call. This fixes that, and adds a ALooper_wake when a non-system event is injectet. Change `handle_system_events_` from `bool` to `atomic_bool` to make it thread safe. Replace deprecated `ALooper_pollAll` with the suggested `ALooper_pollOnce` (*1) to avoid swallowing of `ALooper_wake` calls. Left the `kMaxPollingTimeMillisecond` workaround for swallowed wake calls in place, but increased the timeout to one second to minimize CPU usage. *1: https://developer.android.com/ndk/reference/group/looper#group___looper_1gab2585652f8ae2e2444979194ebe32aaf b/335901937 --------- Co-authored-by: Jelle Foks <[email protected]>
- Loading branch information
1 parent
7664e9a
commit b8d3a02
Showing
2 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters