-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix retrieving command line flags in Android. #84102
Fix retrieving command line flags in Android. #84102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, it works as expected on a Samsung Galaxy Z Fold4 (Android 13).
Testing project: test_android_immersive_mode.zip
Before1 | After (this PR) |
---|---|
APKs for testing:
master
: UnnamedProject_master.zip- This PR: UnnamedProject_pr_84102.zip
Footnotes
-
Showing notification bar is disabled on screenshots in my system settings, but notice how the image is less tall due to some space being taken by the notification bar. ↩
The fix seems correct, but to make it cleaner, I would suggest removing the This seems to be a misinterpretation of the API, this argument is called I confirm that this program prints an empty array: fun main() {
var argc = 4
val cmdline = ArrayList<String>(argc)
println(cmdline)
} I checked and that's the only occurrence of using the optional Note: Please make modifications by amending the commit, and force pushing the changes, so that it stays as a single commit (see PR workflow). |
9f49cdb
to
bc44584
Compare
@MTareqAzim Thanks for the fix! |
The As such, let's leave the original allocation as it was. For most operation it won't make a difference since the default initial capacity is 10, and the argument count is likely to be smaller or equal to that, but in occasional situation, it may be useful. |
bc44584
to
ee31f24
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Thanks! And congrats for your first merged Godot contribution 🎉 |
Fixes #80574
This fix stemmed from immersive mode not working in Godot 4.2. It was caused by the command line flags not properly being retrieved.
In this case, the strings retrieved were not properly added to the ArrayList. I do not know Kotlin, so it took time for me to find this fix, but that also means there might be a better fix than this one.