Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ndk/input_queue: Remove Result wrapping from has_events() #294

Merged
merged 1 commit into from
Jul 5, 2022

Conversation

MarijnS95
Copy link
Member

@MarijnS95 MarijnS95 commented Jun 12, 2022

After having blindly retained error handling in #292, it turns out the underlying InputQueue::hasEvents() implementation doesn't ever return an error nor does the documentation state that this is possible.

As such, mimic what we're already doing in fn pre_dispatch() and panic if the value doesn't represent a bool.

After having blindly retained error handling in [#292], it turns out the
underlying [`InputQueue::hasEvents()` implementation] doesn't ever
return an error nor does the documentation state that this is possible.

As such, mimic what we're already doing in `fn pre_dispatch()` and panic
if the value doesn't represent a `bool`.

[`InputQueue::hasEvents()` implementation]: https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/jni/android_view_InputQueue.cpp;l=88-91;drc=5497dd365e9135805636a40267cb98e2e2b78ee6
[#292]: #292
@MarijnS95 MarijnS95 force-pushed the ndk-input-queue-has-events-bool branch from fd1982a to e7d4b4d Compare July 5, 2022 08:48
@MarijnS95 MarijnS95 merged commit 9c84eed into master Jul 5, 2022
@MarijnS95 MarijnS95 deleted the ndk-input-queue-has-events-bool branch July 5, 2022 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants