Skip to content

Commit

Permalink
Migrate StarboardBridge JNI functions in android_main.cc (#4632)
Browse files Browse the repository at this point in the history
Remove @UsedByNative annotations for beforeStartOrResume and
beforeSuspend, for they are no longer needed in ApplicationAndroid.
Reference b/377042903.

Remove getLocalInterfaceAddressAndNetmask and isCurrentNetworkWireless,
for it's not used in Chrobalt.

Remove @UsedByNative annotations for getDisplaySize, for it's never used
in native code.

Change UA related fields getIsAmatiDevice, getBuildFingerprint,
getPlayServicesVersion to @CalledByNative, we are currently not using
them in UserAgentPlatformInfo::ToString(), but might need them for
cobalt/browser/client_hint_headers.cc in the future.

Migrate the rest of JNI calls in
starboard/android/shared/android_main.cc to Chromium standard JNI,
When testing locally:
startDeepLink is set with empty string.
GetArgs retrieves url.
01-02 22:06:07.303 13993 13993 I starboard:
[dev.cobalt.coat/13993:0103/060607.300538(UTC):INFO:android_main.cc(76)]
Test GetArgs: android_main--url=https://www.youtube.com/tv

b/372559388
  • Loading branch information
haozheng-cobalt authored Jan 8, 2025
1 parent ba698f5 commit 54f9c57
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 151 deletions.
Loading

0 comments on commit 54f9c57

Please sign in to comment.