Files
Yuechuan YangandClaude Opus 5.5 74cf8e7cbc Android: Share Diagnostics in the pause menu (#216)
The pause menu's Share Diagnostics button sends
PanelManager:ClosePanel:TouchShareLog, and the host calls the callback the
shell registered (dm/host/diag.c); only iOS registered one, so on Android
the button did nothing.

Now jni_android.c registers it. The request goes through the existing
native worker thread (text_input_jni.c; JNI only runs there) to
DmActivity.shareDiagnostics, which builds one text file on a background
thread (ShareLog) and opens Android's share sheet:
- header: version, device and SoC, Android version, thermal status,
  battery, memory, storage, time running (no device name, account or
  location);
- the key readings of this run and the previous one (GPU and driver,
  [perf], presents, fps);
- this run's and the previous run's part of boot.log, cut at the line every
  run starts with ("boot: 内部目录"), since Android's boot.log is appended
  to; a run over 6 MB keeps its first 1 MB and last 5 MB.
The file reaches the chosen app through a read-only, non-exported content
provider and the share intent's one-off grant (no AndroidX; the same
pattern as the S2Arm Android app). A missing Java method only turns the
button off and never stops start-up.

Tested on a OnePlus 13: the share sheet opened from the pause menu, the
saved file has the header, both runs' readings and logs. ShareLogTest: 20
checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 10:36:02 +13:00
..