Skip to content

Commit d84c1d1

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
No comment
1 parent 051fc3d commit d84c1d1

46 files changed

Lines changed: 35 additions & 23901 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,20 @@ flowchart TD
339339
| `make lint` | Run golangci-lint | golangci-lint |
340340
| `make clean` | Remove all generated files | -- |
341341

342+
## E2E Test Verification
343+
344+
Run `make test-emulator` to test against a connected device or emulator. Tests skip when `JNICTL_E2E_ADDR` is not set.
345+
346+
<details>
347+
<summary>Verified platforms (click to expand)</summary>
348+
349+
| Type | Device | Android | API | ABI | Build | Date | Passed | Total |
350+
|------|--------|---------|-----|-----|-------|------|--------|-------|
351+
| Phone | Pixel 8a | 16 | 36 | arm64-v8a | BP4A.260205.001 | 2026-03-14 | 21 | 21 |
352+
| Emulator | sdk_gphone64_x86_64 | 15 | 35 | x86_64 | | 2026-03-14 | 21 | 21 |
353+
354+
</details>
355+
342356
## Adding a New Android API Package
343357

344358
1. Create `spec/java/{package}.yaml` with the Java class, methods, and `go_import` path.

cmd/jniservice/JNIService.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,15 @@ public static void main(String[] args) {
1919
System.err.println("jniservice: load failed: " + t);
2020
System.exit(1);
2121
}
22-
// runServer (called from JNI_OnLoad) blocks until the gRPC server
23-
// shuts down, so this point is reached only on clean exit.
24-
System.err.println("jniservice: server exited");
22+
System.err.println("jniservice: server started, waiting...");
23+
// Keep the JVM alive so the Go goroutine serving gRPC can run.
24+
// JNI_OnLoad starts the server in a goroutine and returns.
25+
synchronized (JNIService.class) {
26+
try {
27+
JNIService.class.wait();
28+
} catch (InterruptedException e) {
29+
// Exit on interrupt.
30+
}
31+
}
2532
}
2633
}

0 commit comments

Comments
 (0)