Commit Graph
511 Commits
Author SHA1 Message Date
Michatec 0e736db75c feat: optimize station image retrieval for IPC
- Update `ImageHelper.getStationImageAsByteArray` to support downsampling and JPEG compression for IPC transmission.
- Add `SIZE_STATION_IMAGE_API` constant for consistent image scaling.
- Refactor `PlayerService` to use downsampled images when fetching via `Binder` API.
- Improve thread safety in `PlayerService` station image lookup by consolidating I/O operations and avoiding main-thread access when possible.
2026-11-15 17:34:40 +01:00
Michatec c3d351f646 refactor: remove AIDL custom permission requirement
- Remove `com.michatec.radio.permission.CONTROL_RADIO_API` definition and usage.
- Update `RadioApiService` to remove the permission constraint and add `tools:ignore="ExportedService"`.
- Remove corresponding documentation and usage in `AIDL_API.md`.
2026-11-15 17:20:10 +01:00
Michatec 4d1b2ed365 refactor: remove protectionLevel from CONTROL_RADIO_API permission
Remove the redundant `android:protectionLevel="normal"` attribute from the custom AIDL permission declaration in the manifest.
2026-11-15 17:09:26 +01:00
Michatec 02c088fd6b refactor: optimize thread management in PlayerService image fetching
- Remove `runBlocking(Main)` from `getCurrentStationImage` to avoid blocking the main thread.
- Update `getStationImageByUuid` to use `Dispatchers.IO` for file operations.
- Add check to perform image loading on the main thread if already called from the main looper.
2026-11-15 16:50:03 +01:00
Michatec 66b6e58631 fix: switch runBlocking context to Main for image retrieval in PlayerService
- Change `runBlocking` dispatcher from `IO` to `Main` in `getCurrentStationImage` and `getStationImageByUuid` to ensure safe access to player state and service context.
2026-11-15 16:35:56 +01:00
Michatec d744b777ec fix: offload image retrieval to Dispatchers.IO in PlayerService
- Replace `runBlocking(Main)` with `runBlocking(Dispatchers.IO)` in `getCurrentStationImage` and `getStationImageByUuid` to prevent potential UI thread blocking during file I/O.
2026-11-15 16:24:23 +01:00
Michatec cecb97f5a1 refactor: remove unused Uri import in RadioApiService 2026-11-15 16:08:31 +01:00
Michatec b565a0ff58 feat: migrate station image retrieval from URI to byte array
- Update AIDL interface methods `getCurrentStationImage` and `getStationImageByUuid` to return `byte[]` instead of `String`.
- Implement `ImageHelper.getStationImageAsByteArray` to handle the conversion of station image URIs to byte arrays.
- Refactor `PlayerService` and `RadioApiService` to support binary image data retrieval, removing redundant file/URI logic in the service wrapper.
2026-11-15 16:07:56 +01:00
Michatec 5ecc19852c Merge remote-tracking branch 'origin/main' 2026-11-15 15:37:40 +01:00
Michatec 6c3b6ba21d fix: use runBlocking(Main) for thread dispatching in PlayerService binder methods
- Replace custom CountDownLatch and Handler synchronization with `runBlocking(Main)` in PlayerService binder methods (`isPlaying`, `getCurrentStationName`, `getCurrentMetadata`).
- Add intent query for `IRadioApi` to package visibility configuration in AIDL documentation.
2026-11-15 15:37:29 +01:00
Michachatz c367dc737d Merge pull request #124 from Michatec/renovate/ksp-monorepo
chore(deps): update dependency com.google.devtools.ksp to v2.3.14
2026-11-15 15:21:39 +01:00
renovate[bot] 27df2a1111 chore(deps): update dependency com.google.devtools.ksp to v2.3.14 2026-11-15 14:20:34 +00:00
Michatec 2619675118 feat: implement WebDAV cloud sync, AppFunctions, and Quick Settings tile
- Add `WebDavSyncHelper` and `CryptoHelper` to support encrypted WebDAV cloud backup and restore in settings.
- Implement `RadioAppFunctionService` and voice search intent handling for system and assistant integrations.
- Add `RadioTileService` to provide a Quick Settings tile for playback control and status.
- Expand `IRadioApi` AIDL interface to support fetching station cover image URIs.
2026-11-15 15:19:51 +01:00
Michachatz 4833fe07b4 Merge pull request #123 from Michatec/renovate/gradle-9.x
chore(deps): update gradle to v9.9.1
2026-11-11 07:45:03 +01:00
renovate[bot] b4685280b8 chore(deps): update gradle to v9.9.1 2026-11-11 01:03:43 +00:00
Michachatz 2c7e12d661 Merge pull request #122 from Michatec/renovate/gradle-9.x
chore(deps): update gradle to v9.9.0
2026-11-08 18:02:36 +01:00
renovate[bot] 6e7183b144 chore(deps): update gradle to v9.9.0 2026-11-06 20:44:17 +00:00
Michachatz d39d601518 Merge pull request #121 from Michatec/renovate/agp
chore(deps): update agp to v9.5.1
2026-11-06 16:17:19 +01:00
renovate[bot] d0b527be00 chore(deps): update agp to v9.5.1 2026-11-06 00:48:52 +00:00
Michatec 1a214d1683 feat: implement station stream health checking
- Add `StationHealthChecker` to asynchronously test station stream availability, response codes, and latency.
- Add long-click listener on the save button in `CollectionAdapter` to trigger health checks and display results via `Snackbar`.
- Add localized string resources for stream health check status UI messages.
- Update `provider_paths.xml` to include internal files and cache directory paths for FileProvider.
2026-11-05 18:12:39 +01:00
Michatec 50cd0b99a7 docs: update Shizuku integration description in README
- Clarify minimum version requirement (v15.2) for Shizuku support.
- Expand explanation of benefits regarding battery optimization and background playback reliability.
2026-11-01 11:51:21 +01:00
Michatec 0986735348 docs: add Shizuku integration section to README 2026-11-01 11:48:59 +01:00
Michatec e3e1e1f10a docs: update REST API minimum version in API_DOC.md 2026-11-01 11:37:42 +01:00
Michatec 81a2c630b3 docs: add comprehensive developer documentation for REST and AIDL APIs
- Create `docs/API_DOC.md` as an entry point for developer integrations.
- Create `docs/REST_API.md` documenting endpoints, authentication, and QR code pairing.
- Rename existing `API_DOC.md` to `docs/AIDL_API.md` to standardize documentation structure.
- Update `README.md` to include links and descriptions for both API surfaces.
2026-11-01 11:33:39 +01:00
Michachatz b1cfd63b54 Update SECURITY.md 2026-11-01 00:11:47 +01:00
Michatec d69a8dfe77 fix: station UUID existence validation before playback 2026-10-31 23:53:43 +01:00
Michatec a55dc6acd1 docs: document AIDL Developer API in README 2026-10-31 23:43:04 +01:00
Michatec d80e5e2e17 fix: dispatch PlaybackController calls to main thread 2026-10-31 23:24:23 +01:00
Michatec ba1dd4e9eb fix: remove runBlocking(Main) from PlaybackController to prevent main thread deadlock 2026-10-31 23:09:36 +01:00
Michatec 0f6f774e73 feat: implement intent-based playback control for PlayerService
- Add handling for `PLAY` and `PLAY_STATION` actions in `PlayerService.onStartCommand`.
- Update `RadioApiService` to trigger playback via intents when `playbackController` is not yet initialized.
- Add `startPlayerService` helper method in `RadioApiService` to encapsulate service starting logic.
2026-10-31 22:42:41 +01:00
Michatec e315c7a037 test: include Android resources in unit tests
- Set `isIncludeAndroidResources` to `true` within `testOptions` in `app/build.gradle.kts`.
2026-10-31 22:35:52 +01:00
Michatec a9a228bba2 refactor: remove artificial delay when starting playback in RadioApiService
- Remove 500ms delay when calling `play()` and `playStationByUuid()`.
- Remove unused `Handler`, `Looper`, and `Keys` imports.
- Reorder helper imports for consistency.
2026-10-31 22:25:05 +01:00
Michatec 91c33d4abf fix: delay playback initiation and use playbackController directly
- Add a 500ms delay using `Handler` before triggering playback actions to ensure controller availability.
- Remove `EXTRA_STATION_UUID` from the `PlayerService` start intent.
- Transition to calling `playbackController.play()` and `playbackController.playStationByUuid(uuid)` directly.
2026-10-31 22:08:03 +01:00
Michatec b8130c64c8 chore: set Kotlin code style to official
- Add `kotlin.code.style=official` to `gradle.properties`.
2026-10-31 21:58:58 +01:00
Michatec aec4fadf18 refactor: remove intent-based play commands from PlayerService
- Remove `EXTRA_PLAY_COMMAND`, `PLAY_COMMAND_PLAY`, and `PLAY_COMMAND_PLAY_STATION` constants from `Keys.kt`.
- Remove manual play command handling in `PlayerService.onStartCommand`.
- Simplify `PlayerService` start intents in `RadioApiService` by removing unnecessary play command extras.
2026-10-31 21:57:22 +01:00
Michatec 04a1aa3dde feat: implement command-based playback triggering in PlayerService
- Add `EXTRA_PLAY_COMMAND`, `PLAY_COMMAND_PLAY`, and `PLAY_COMMAND_PLAY_STATION` constants to `Keys.kt`.
- Update `PlayerService.onStartCommand` to process playback commands from intent extras.
- Modify `RadioApiService` to pass playback commands when starting `PlayerService`.
2026-10-31 21:43:48 +01:00
Michatec f2d926d8ba fix: use media title for current track metadata
- Update `PlayerService` to return the media title instead of artist in `getCurrentMetadata`.
- Refactor `RemoteControlServer` to retrieve `currentTrack` directly from media metadata instead of loading from metadata history.
2026-10-31 21:22:29 +01:00
Michatec 008ac4bc34 fix: prevent station name from being added to metadata history
- Skip adding metadata to the history list if the metadata string matches the current station name.
- Move `currentMediaItem` retrieval earlier in the processing logic to facilitate the station name comparison.
2026-10-31 21:07:47 +01:00
Michatec 33ff113989 feat: implement metadata history tracking and UI updates
- Add `updateMetadata` function to `LayoutHolder` to handle metadata persistence in `metadataHistory` and update UI views.
- Implement `onMediaMetadataChanged` in `PlayerFragment` to trigger metadata updates from the media controller.
- Integrate history management logic to save unique metadata entries and enforce maximum history size via `PreferencesHelper`.
2026-10-31 21:01:56 +01:00
Michatec eed4b097b8 fix: improve station name retrieval for media metadata updates
- Update `PlayerService.kt` to fetch the station name from the collection using `mediaId` via `CollectionHelper`.
- Fall back to the existing artist metadata if the retrieved station name is empty.
2026-10-31 20:42:39 +01:00
Michatec 34aa8cde03 feat: update media metadata dynamically during playback
- Update the current `MediaItem` in `PlayerService.kt` when new metadata is received.
- Set the original station name as the artist and the new metadata string as the title and display title.
- Replace the current media item in the player to ensure UI components reflect the updated metadata.
2026-10-31 20:34:22 +01:00
Michatec 0125e97307 fix: execute PlaybackController methods on the main thread
- Wrap all overridden methods in `RadioApiService.PlaybackController` with `runBlocking(Main)`.
- Ensure player operations and media metadata retrievals in `PlayerService` execute safely on the main thread.
2026-10-31 19:57:42 +01:00
Michatec 143484a37f feat: add AIDL API service and refactor Shizuku power management
- Introduce the `IRadioApi` AIDL interface and `RadioApiService` to support external IPC playback control and station metadata retrieval.
- Connect `PlayerService` to `RadioApiService` using an internal `PlaybackController` callback interface.
- Extract background battery optimization logic from `Shizuku` into a dedicated `RadioPowerManager` class featuring atomic backup, restoration, and rollback capabilities.
- Update `ShizukuFragment` to execute power optimization tasks asynchronously via Kotlin coroutines.
- Enable AIDL feature support in Gradle, add documentation in `API_DOC.md`, and include `junit` and `mockito-core` test dependencies.
2026-10-31 19:35:16 +01:00
Michachatz a55930d00a Merge pull request #120 from Michatec/renovate/ktor-monorepo
fix(deps): update ktor monorepo to v3.6.1
2026-10-29 19:51:08 +01:00
Michachatz 7adeb4f5e9 Merge pull request #119 from Michatec/renovate/agp
chore(deps): update agp to v9.5.0
2026-10-29 19:50:35 +01:00
Michatec f1810dcd20 feat: add Shizuku integration for background playback optimization
- Implement `Shizuku` helper and `ShizukuFragment` using Jetpack Compose to manage system permissions and Doze mode battery optimization whitelisting.
- Add Shizuku API and provider dependencies, manifest provider configuration, vector icon, and localized strings.
- Add Shizuku preference entry to `SettingsFragment` and navigation graph.
- Update QR code verification logic to show a toast message on Android TV instead of hiding the preference.
2026-10-29 19:48:21 +01:00
renovate[bot] 9db93bf4f9 fix(deps): update ktor monorepo to v3.6.1 2026-10-29 16:39:27 +00:00
renovate[bot] efe89a01eb chore(deps): update dependency com.android.application to v9.5.0 2026-10-28 16:10:06 +00:00
Michatec 8640368a50 refactor: cleanup constants and simplify preference logic
- Remove unused `ACTION_REMOTE_SERVER_ERROR` and `ACTION_REMOTE_AUTH_FAILED` constants from `Keys.kt`.
- Simplify `constantTimeEquals` implementation in `SettingsFragment.kt`.
- Refactor `preferenceEnableEditingStreamUri` enablement logic to use a concise boolean expression.
2026-10-24 19:43:13 +02:00
Michachatz 06d09fa31a Merge pull request #118 from Michatec/renovate/gson
fix(deps): update dependency com.google.code.gson:gson to v2.15.0
2026-10-24 18:04:09 +02:00