-
Notifications
You must be signed in to change notification settings - Fork 258
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
[BUG] android_native_app_glue APP_CMD_WINDOW_RESIZED / APP_CMD_WINDOW_REDRAW_NEEDED / APP_CMD_CONTENT_RECT_CHANGED #1139
Comments
oops. i can't explain that from the history --- onContentRectChanged, for example, has been there since 2012.
yes, feel free to do that. i don't know what @DanAlbert thinks, but i'm torn about fixing this. it's obviously wrong, but i'm wary of suddenly sending folks messages they didn't receive in the past. |
Can we do this in a |
no, that's the kicker --- all of this stuff is actually ancient, it's just a bug that it's still not wired up here in the NDK glue. (so although we could make it depend on given that you'd have to rebuild your app with a newer NDK to start seeing this stuff work like the docs claim it should work, maybe it's okay to change? |
dan explained in person that what he meant was checking target sdk version at run-time, which makes this a run-time behavior difference (of the kind that app developers expect when incrementing target sdk version) rather than a build-time difference ("because i used a newer NDK") which app developers expect to manifest as a compile-time difference (aka build break :-) ). anyway, https://android-review.googlesource.com/c/platform/ndk/+/1180321 is a possible implementation (without the run-time check). i still need to find the time to actually work that into a sample app and test it properly though... |
@tsuoranta any thoughts on whether we should gate the new behavior behind |
@DanAlbert I think the proposed fix is fine and adding run-time check would make the fix harder to get and add more confusion. We all know that we should thoroughly test our apps after upgrading the NDK anyway. For what it’s worth I've been using this workaround successfully :
|
SGTM. Thanks for the feedback. |
@DanAlbert, will be this fix included in NDK 21 ? |
No. The sidebar on the right shows which release a bug is triaged for, btw. |
https://android-review.googlesource.com/c/platform/ndk/+/1180321 merged for r22. |
Also reduce duplication very slightly. Bug: android/ndk#1139 Test: builds Test: https://github.com/android/ndk-samples/tree/master/native-activity Change-Id: I6658af95828f0532232616d621a4883d538c4c76
Also reduce duplication very slightly. Bug: android/ndk#1139 Test: builds Test: https://github.com/android/ndk-samples/tree/master/native-activity Change-Id: I6658af95828f0532232616d621a4883d538c4c76
…tform/ndk/+/1180321 some APP_CMDs callbacks were never triggered: affects APP_CMD_WINDOW_RESIZED / APP_CMD_WINDOW_REDRAW_NEEDED / APP_CMD_CONTENT_RECT_CHANGED See android/ndk#1139
…tform/ndk/+/1180321 some APP_CMDs callbacks were never triggered: APP_CMD_WINDOW_RESIZED / APP_CMD_WINDOW_REDRAW_NEEDED / APP_CMD_CONTENT_RECT_CHANGED See android/ndk#1139
…tform/ndk/+/1180321 some APP_CMDs callbacks were never triggered: APP_CMD_WINDOW_RESIZED / APP_CMD_WINDOW_REDRAW_NEEDED / APP_CMD_CONTENT_RECT_CHANGED See android/ndk#1139
Description
android_native_app_glue.h
has a fewAPP_CMD
s which are never created byandroid_native_app_glue.c
:Looking at
base/core/jni/android_app_NativeActivity.cpp
andbase/core/java/android/app/NativeActivity.java
it seems callbacks such ascode->callbacks.onNativeWindowResized
would be called, ifandroid_native_app_glue.c
would bother to set up such callback function.How should I deal with these APP_CMDs? I could use modified android_native_app_glue and wire them. Or is it safe to ignore these?
Environment Details
The text was updated successfully, but these errors were encountered: