Files
sx/library/modules
agra ba0a1a13e3 ffi 1.25: sx-side reimplementation of safe-insets JNI chain
Phase 1D for `library/vendors/sx_android_jni/sx_android_jni.c` starts
here. Adds `sx_query_safe_insets_jni` to `library/modules/platform/
android.sx` — a sx-side implementation of the JNI dispatch chain
that lives inside the C `sx_android_query_safe_insets` helper.

The C version is ~50 lines of `(*env)->GetMethodID` + `CallObjectMethod`
+ `CallIntMethod` boilerplate with manual `goto done` early-exit
plumbing on every step. The sx version collapses to four
`#jni_call(*void)` chain steps + four `#jni_call(s32)` reads at the
end — each #jni_call internally handles GetObjectClass + GetMethodID
+ Call<Type>Method via the slot interning from 1.17.

Signature differences from the C version:
- The sx version takes `env: *void` directly. The C version derives
  it from `ANativeActivity*` via JavaVM's GetEnv/AttachCurrentThread.
  Bridging that gap (sx-side JavaVM dispatch OR a tiny C shim that
  returns the env) is the next Phase 1D step.
- The activity arg here is the jobject (`ANativeActivity*.clazz`)
  rather than the activity pointer itself.

No call sites switched yet. Chess Android still uses the foreign C
function. Cross-compile + chess both targets all clean — verifies
the new function typechecks and lowers, but on-device runtime
verification is deferred to the integration commit.
2026-05-19 22:54:24 +03:00
..
2026-05-18 17:40:10 +03:00
2026-05-17 13:49:25 +03:00
2026-05-18 17:40:10 +03:00