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

JNI migration to jni_generator for file starboard/android/shared/file_internal.cc #4684

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

haozheng-cobalt
Copy link
Contributor

@haozheng-cobalt haozheng-cobalt commented Jan 10, 2025

This PR primarily does JNI migration to jni_generator for file starboard/android/shared/file_internal.cc.
Manually retrieving jclass, jmethodID etc. for android.content.Context because I'm not familiar with how to generate boilerplate code using jni_generator for Android SDK in gn.
This PR also migrates StarboardBridge functions requestSuspend, raisePlatformError, getUserAgentAuxField.

Local testing:
haozheng@haozheng:~/chromium/src$ adb logcat | grep dir:
01-15 13:57:49.181 21743 21743 I starboard: [dev.cobalt.coat/21743:0115/215749.180116(UTC):INFO:file_internal.cc(63)] Files dir: /data/user/0/dev.cobalt.coat/files
01-15 13:57:49.181 21743 21743 I starboard: [dev.cobalt.coat/21743:0115/215749.181740(UTC):INFO:file_internal.cc(69)] Cache dir: /data/user/0/dev.cobalt.coat/cache
01-15 13:57:49.182 21743 21743 I starboard: [dev.cobalt.coat/21743:0115/215749.182423(UTC):INFO:file_internal.cc(76)] Lib dir: /data/app/~~XYAjxFO9qO3w-PB__fJrIw==/dev.cobalt.coat-lopgoPVMucdrTtNnP5MMog==/lib/arm

b/389117681

@haozheng-cobalt haozheng-cobalt self-assigned this Jan 15, 2025
@haozheng-cobalt haozheng-cobalt changed the title Migrate JNI functions in StarboardBridge JNI migration to jni_generator for file starboard/android/shared/file_internal.cc Jan 15, 2025
@haozheng-cobalt haozheng-cobalt marked this pull request as ready for review January 15, 2025 22:40
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.

1 participant