Skip to content

copied_base: Include JniAndroid in base_java - #13561

Merged
andrewsavage1 merged 2 commits into
youtube:mainfrom
hferreiro:aosp-jniandroid
Oct 23, 2026
Merged

andrewsavage1 merged 2 commits into
youtube:mainfrom
hferreiro:aosp-jniandroid

Conversation

@hferreiro

@hferreiro hferreiro commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

copied_base's jni_android.cc reports uncaught Java exceptions through
org.chromium.base.JniAndroid, but the Java class was never compiled
into base_java. The class was missing from the AOSP apks, so any Java
exception raised under JNI crashed with a ClassNotFoundException for
JniAndroid instead of logging the real Java stack trace.

Add JniAndroid.java and its JNI srcjar to base_java, as upstream did
before JniAndroid moved to its own library.

Bug: 495203133

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
Context State Description
CI / All Pass ✅ PASS All checks passed
CI / android ✅ PASS Passed
CI / evergreen ✅ PASS Passed
CI / linux ✅ PASS Passed
CI / tvos ✅ PASS Passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Android build configuration in copied_base/base/BUILD.gn by adding the :jni_android_jni target dependency and including the JniAndroid.java source file. There are no review comments, and I have no feedback to provide.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Gemini Suggested Commit Message


android: Include JniAndroid in base_java

jni_android.cc in copied_base reports uncaught Java exceptions via
org.chromium.base.JniAndroid. Although the JNI header was previously
added, the corresponding Java class was missing from the base_java
target. This caused a ClassNotFoundException for JniAndroid whenever a
real Java exception occurred, preventing the actual stack trace from
being logged.

Add JniAndroid.java and its JNI srcjar to base_java to ensure correct
exception reporting on Android.

Bug: 495203133

💡 Pro Tips for a Better Commit Message:

  1. Influence the Result: Want to change the output? You can write custom prompts or instructions directly in the Pull Request description. The model uses that text to generate the message.
  2. Re-run the Generator: Post a comment with: /generate-commit-message
copied_base's jni_android.cc reports uncaught Java exceptions through
org.chromium.base.JniAndroid, but the Java class was never compiled
into base_java. The class was missing from the AOSP apks, so any Java
exception raised under JNI crashed with a ClassNotFoundException for
JniAndroid instead of logging the real Java stack trace.

Add JniAndroid.java and its JNI srcjar to base_java, as upstream did
before JniAndroid moved to its own library.

Bug: 495203133
@andrewsavage1
andrewsavage1 enabled auto-merge (squash) October 23, 2026 00:03
@andrewsavage1
andrewsavage1 merged commit 90e22a2 into youtube:main Oct 23, 2026
716 of 722 checks passed
cobalt-github-releaser-bot pushed a commit that referenced this pull request Oct 23, 2026
Refer to original PR: #13561

copied_base's jni_android.cc reports uncaught Java exceptions through
org.chromium.base.JniAndroid, but the Java class was never compiled
into base_java. The class was missing from the AOSP apks, so any Java
exception raised under JNI crashed with a ClassNotFoundException for
JniAndroid instead of logging the real Java stack trace.

Add JniAndroid.java and its JNI srcjar to base_java, as upstream did
before JniAndroid moved to its own library.

Bug: 495203133

(cherry picked from commit 90e22a2)
@hferreiro
hferreiro deleted the aosp-jniandroid branch October 23, 2026 10:31
briantting pushed a commit that referenced this pull request Oct 27, 2026
Refer to original PR: #13561

copied_base's jni_android.cc reports uncaught Java exceptions through
org.chromium.base.JniAndroid, but the Java class was never compiled
into base_java. The class was missing from the AOSP apks, so any Java
exception raised under JNI crashed with a ClassNotFoundException for
JniAndroid instead of logging the real Java stack trace.

Add JniAndroid.java and its JNI srcjar to base_java, as upstream did
before JniAndroid moved to its own library.

Bug: 495203133

(cherry picked from commit 90e22a2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants