chore(android): port BootReceiver Kotlin→Java shim (Gossamer #83)#122
Open
hyperpolymath wants to merge 2 commits into
Open
chore(android): port BootReceiver Kotlin→Java shim (Gossamer #83)#122hyperpolymath wants to merge 2 commits into
hyperpolymath wants to merge 2 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
BootReceiverwith a thin, hand-written JavaBroadcastReceivershim. OnBOOT_COMPLETED/LOCKED_BOOT_COMPLETEDit starts the neurophone foregroundNeurophoneService(the service from sub-PR #5) viastartForegroundService. 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
android/app/src/main/java/ai/neurophone/BootReceiver.java— Java shim,SPDX-License-Identifier: MPL-2.0.android/app/src/main/java/ai/neurophone/BootReceiver.kt.android/app/src/main/AndroidManifest.xml— receiver registration is class-name based (.BootReceiver) and therefore migration-transparent; only updated the surrounding comment + aTODO(#83 rebase)marker.Constraints honoured
android/, covered by the existing.hypatia-baseline.jsonexemption (android/**, tracking RFC: Android Kotlin → Rust/Gossamer migration #97). No baseline edit needed.SPDX-License-Identifier: MPL-2.0.android/is not a cargo workspace member, so the Rust workspace is unaffected.Verified
.BootReceiver(correct, class-name based); no Kotlin/Gradle references to the removed class remain.android/confirmed absent from the cargo[workspace] memberslist — the migration changes cannot affect the Rust build.cargo build --workspace: pre-existing failures inesn/lsm(arand/ndarray-randtrait-bound mismatch:no method named random/sample found for &mut impl Rng). These reproduce on pristinemainwith zero changes and are unrelated to this PR.cargo test --workspaceis blocked by the same pre-existing compile failure. This PR does not introduce or worsen them.TODOs / risks
TODO(#83 rebase)— depends on sub-PRs chore(deps): update rand_distr requirement from 0.4 to 0.5 #3 (scaffolding), chore(deps): update thiserror requirement from 1.0 to 2.0 #4 (NativeLib→Rust), chore(deps): update ndarray requirement from 0.15 to 0.17 #5 (Service shim), none yet merged. TheNeurophoneServicereference and package layout are assumed from currentmain; re-point if chore(deps): update thiserror requirement from 1.0 to 2.0 #4/chore(deps): update ndarray requirement from 0.15 to 0.17 #5 rename or relocate the service entrypoint.TODO(#83)— once the Rust JNI boot-policy entrypoint exists, delegate the "should we restart?" decision tocrates/neurophone-androidinstead of unconditionally starting the service.esn/lsmworkspace build break is environmental (dependency drift) and should be tracked separately; it is not caused by this PR.https://claude.ai/code/session_01Gu1JFCZHuBtBhAWPr4sMQw
Generated by Claude Code