Skip to content

chore(android): port BootReceiver Kotlin→Java shim (Gossamer #83)#122

Open
hyperpolymath wants to merge 2 commits into
mainfrom
chore/gossamer-bootreceiver
Open

chore(android): port BootReceiver Kotlin→Java shim (Gossamer #83)#122
hyperpolymath wants to merge 2 commits into
mainfrom
chore/gossamer-bootreceiver

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

neurophone sub-PR #6 — port BootReceiver

Part of the Android Kotlin→Rust/Gossamer migration (epic #83, RFC PR #97, sub-issue #112).

What this does

Replaces the Kotlin BootReceiver with a thin, hand-written Java BroadcastReceiver shim. On BOOT_COMPLETED / LOCKED_BOOT_COMPLETED it starts the neurophone foreground NeurophoneService (the service from sub-PR #5) via startForegroundService. The receiver carries no business logic — any runtime policy (e.g. "was it running before reboot?") and all inference live behind the Rust JNI (crates/neurophone-android), reached through the service start path, not here.

Files changed

  • Added android/app/src/main/java/ai/neurophone/BootReceiver.java — Java shim, SPDX-License-Identifier: MPL-2.0.
  • Deleted android/app/src/main/java/ai/neurophone/BootReceiver.kt.
  • Modified android/app/src/main/AndroidManifest.xml — receiver registration is class-name based (.BootReceiver) and therefore migration-transparent; only updated the surrounding comment + a TODO(#83 rebase) marker.

Constraints honoured

  • Hand-written Java lives only under android/, covered by the existing .hypatia-baseline.json exemption (android/**, tracking RFC: Android Kotlin → Rust/Gossamer migration #97). No baseline edit needed.
  • New file carries SPDX-License-Identifier: MPL-2.0.
  • Change set is Java + manifest only; touches zero Rust files. android/ is not a cargo workspace member, so the Rust workspace is unaffected.

Verified

  • No stale references: only the manifest references .BootReceiver (correct, class-name based); no Kotlin/Gradle references to the removed class remain.
  • android/ confirmed absent from the cargo [workspace] members list — the migration changes cannot affect the Rust build.
  • Ran cargo build --workspace: pre-existing failures in esn/lsm (a rand / ndarray-rand trait-bound mismatch: no method named random/sample found for &mut impl Rng). These reproduce on pristine main with zero changes and are unrelated to this PR. cargo test --workspace is blocked by the same pre-existing compile failure. This PR does not introduce or worsen them.

TODOs / risks

https://claude.ai/code/session_01Gu1JFCZHuBtBhAWPr4sMQw


Generated by Claude Code

Replace the Kotlin BootReceiver with a thin hand-written Java
BroadcastReceiver shim that, on BOOT_COMPLETED / LOCKED_BOOT_COMPLETED,
starts the neurophone foreground NeurophoneService (sub-PR #5). The
receiver carries no business logic; runtime policy and inference live
behind the Rust JNI (crates/neurophone-android).

Hand-written Java is permitted only under android/ via the existing
.hypatia-baseline.json exemption for the in-flight Gossamer migration.
Manifest registration is class-name based and unchanged.

Part of epic #83 (RFC PR #97, sub-issue #112). Depends on sub-PRs
#3/#4/#5 (not merged); TODO(#83 rebase) markers in place.

https://claude.ai/code/session_01Gu1JFCZHuBtBhAWPr4sMQw
@hyperpolymath hyperpolymath marked this pull request as ready for review June 3, 2026 21:08
@hyperpolymath hyperpolymath enabled auto-merge (squash) June 3, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants