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

ALooper_pollAll is marked deprecated by Android NDK #170

Open
wuwbobo2021 opened this issue Nov 2, 2024 · 2 comments
Open

ALooper_pollAll is marked deprecated by Android NDK #170

wuwbobo2021 opened this issue Nov 2, 2024 · 2 comments

Comments

@wuwbobo2021
Copy link

wuwbobo2021 commented Nov 2, 2024

I have found this discussion occasionally: android/ndk#2020.

Check https://developer.android.com/ndk/reference/group/looper#alooper_pollall:

[Deprecated. ] Calls to ALooper_pollAll should be replaced with ALooper_pollOnce. If you call ALooper_pollOnce in a loop, you must treat all return values as if they also indicate ALOOPER_POLL_WAKE.

@MarijnS95
Copy link
Member

On the NDK side this is handled in rust-mobile/ndk#491. If we didn't replace it in android-activity yet, a crate upgrade will cause a deprecation warning.

@wuwbobo2021 wuwbobo2021 changed the title ALooper_pollAll is marked deprecated by Android NDK Please document that attach_current_thread_permanently() prevents automatic de-allocation of JNI local references; ALooper_pollAll is marked deprecated by Android NDK Nov 16, 2024
@MarijnS95 MarijnS95 changed the title Please document that attach_current_thread_permanently() prevents automatic de-allocation of JNI local references; ALooper_pollAll is marked deprecated by Android NDK ALooper_pollAll is marked deprecated by Android NDK Nov 16, 2024
@MarijnS95
Copy link
Member

@wuwbobo2021 I've restored the original title and hid your new off-topic issue. Please refrain from using one issue to track multiple disjoint user requests, and instead open a new issue for anything that's unrelated.

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

No branches or pull requests

2 participants