refactor: Remove AIDL API and modernize service architecture#5586
refactor: Remove AIDL API and modernize service architecture#5586jamesarich wants to merge 8 commits into
Conversation
2777fe8 to
3fde9cc
Compare
3fde9cc to
b304b0d
Compare
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
📄 Docs staleness check — advisoryThis PR modifies user-facing UI source files but does not update any page under
Changed source files: What to check:
New page checklist (if adding a new doc page):
If this PR does not require a doc update (e.g., internal refactor, bug fix, test change), add the
|
🖼️ Preview staleness check — advisoryThis PR modifies UI composables but does not update any
Changed UI files: What to check:
Adding previews checklist:
If this PR does not require preview updates (e.g., logic-only change, non-visual refactor), add the |
51fff3c to
6f447c8
Compare
237f5e1 to
059ee97
Compare
Remove the deprecated AIDL/IPC API surface and perform deep architectural
modernization of the radio command pipeline, aligning with the meshtastic-sdk
AdminApiImpl pattern for future SDK migration.
Key changes:
1. AIDL Removal & Infrastructure Cleanup
- Delete core:api module and all AIDL interfaces
- Remove ServiceBroadcasts + CommonParcelable infrastructure
- Remove core:api from CI workflow lint/publish steps
2. Model Modernization
- Introduce NodeAddress sealed class with type-safe addressing
- Remove deprecated DataPacket constants in favor of NodeAddress
- Consolidate dual node maps into single source with getNodeById
- Split large model files, deduplicate NodeEntity, flatten RadioController
3. Service Layer Refactoring (SDK-aligned)
- Remove ServiceAction sealed class, use direct suspend calls
- Convert CommandSender & MeshActionHandler to suspend APIs
- Merge MeshActionHandler into DirectRadioControllerImpl
(ViewModel → RadioController → CommandSender, no intermediate layer)
- Build AdminMessage protos directly with typed protos end-to-end
- Apply structured concurrency to NodeRequestActions/NodeManagementActions
- Fix CancellationException handling throughout
Architecture (before → after):
ViewModel → RadioController → Handler → CommandSender → PacketHandler
ViewModel → RadioController → CommandSender → PacketHandler
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- NodeAddressTest: 37 tests covering sealed class parser, roundtrip, extensions (ContactKey, DataPacket), edge cases - CommandSenderImplTest: 20 tests covering packet ID generation, address resolution, sendData validation, admin messages, position - DirectRadioControllerImplTest: +8 tests for reboot/shutdown/factory reset, importContact, refreshMetadata - NodeManagerImplTest: +7 tests for getMyNodeInfo aggregation, getMyId, null telemetry handling Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
With AGP 9's built-in Kotlin, org.jetbrains.kotlin.android is no longer
applied to Android modules. Convention plugin hooks using
withPlugin("org.jetbrains.kotlin.android") were dead code — replaced
with withPlugin("com.android.application") and
withPlugin("com.android.library") which correctly trigger for
Android-only modules using built-in Kotlin.
- KoinConventionPlugin: split into app + library hooks
- AndroidRoomConventionPlugin: use com.android.library hook
- KotlinXSerializationConventionPlugin: use app + library hooks
- Remove kotlin-android from version catalog and root build.gradle.kts
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
No modules are published externally anymore (core:api was removed).
Remove all publishing-related configuration:
- Delete PublishingConventionPlugin and its registration
- Remove publish-core.yml workflow
- Strip publishing{} blocks from core/model and core/proto
- Remove PUBLISHED_MODULES set and Java 17 compatibility logic
- Unify all modules to JDK 21 toolchain and JVM target
- Remove unused imports (JavaToolchainService, JavaLanguageVersion, Test)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove x86/x86_64 from ABI filters (armeabi-v7a/arm64-v8a only) - Remove unused takpacket-sdk-jvm from version catalog - Raise core/proto minSdk from 21 to 26 (ATAK compat no longer needed) - Remove stale FIXME comment about foreground service in manifest - Replace Executors.newSingleThreadExecutor with Dispatchers.Default.asExecutor in BarcodeScannerProvider (removes manual thread pool management) - Convert formatAgo() to @composable with stringResource(), eliminating runBlocking from the UI rendering path. Non-composable callers (map views, accessibility) use a 3-arg overload with pre-resolved strings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Wrap StateFlow.value read in remember{} to satisfy composition lint
- Wrap derivedStateOf in remember{} (MapView PurgeTileSourceDialog)
- Use mutableIntStateOf to avoid autoboxing (MapStyleDialog)
- Use ResourcesCompat.getDrawable() instead of deprecated getDrawable()
- Fix mixed indentation in MarkerClusterer.java
Lint result: 0 errors, 10 warnings (down from 2 errors, 12 warnings)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This feature flag is now enabled by default in the Compose compiler, making the explicit opt-in unnecessary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
f475045 to
66ae840
Compare
Summary
Removes the deprecated AIDL bound-service API and all associated infrastructure, replacing it with a direct suspend-based SDK architecture. This eliminates ~3,200 lines of indirection while preserving identical runtime behavior.
Changes
AIDL Removal
core:apimodule (AIDL interfaces, bound service, action routing)IMeshService.aidl, service bindings, and broadcast-based command dispatchRadioControllersuspend calls from ViewModels/use casesArchitecture Modernization
MeshActionHandlerintoDirectRadioControllerImplServiceActionenum and intent-based routingBuild System Cleanup
PublishingConventionPlugin,publish-core.yml)OptimizeNonSkippingGroupscompiler flagCode Quality
runBlockingfrom UI rendering path (formatAgodual-overload)getDrawable()withResourcesCompat.getDrawable()Stats
Testing
./gradlew spotlessApply detekt assembleDebug test allTestspassesNodeAddressandCommandSender