Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 9 additions & 20 deletions Android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,31 +1,20 @@
-keeppackagenames **
# Skip framework packages must be kept verbatim — JNI looks them up by name.
-keeppackagenames maxi80.**
-keeppackagenames skip.**
-keeppackagenames tools.skip.**
-keep class skip.** { *; }
-keep class tools.skip.** { *; }
-keep class kotlin.jvm.functions.** {*;}
-keep class kotlin.jvm.functions.** { *; }
-keep class com.sun.jna.** { *; }
-dontwarn java.awt.**
-keep class * implements com.sun.jna.** { *; }
-keep class * implements skip.bridge.** { *; }
-keep class **._ModuleBundleAccessor_* { *; }
-keep class maxi80.module.** { *; }
# Transpiled Maxi80Services classes are reached only via JNI-by-name from the native
# Swift bridge (e.g. PlatformEnvironment), so R8 can't see the reference and would
# strip/rename them — causing ClassNotFoundException at launch in minified builds.
# Transpiled Maxi80Services classes are reached only via JNI-by-name from the native Swift bridge.
-keep class maxi80.services.** { *; }

# Media3 (ExoPlayer) surface used by the now-playing writeback. The phone playback path drives
# the notification metadata through the Skip JNI-by-name bridge:
# AndroidNowPlayingController.platformUpdateNowPlaying → player.getCurrentMediaItem /
# getCurrentMediaItemIndex / replaceMediaItem, rendered by DefaultMediaNotificationProvider from
# MediaItem.getMediaMetadata(). R8 can't see those by-name references in a minified release build
# and could strip/rename them, leaving the initial metadata stuck — matching issue #13.
#
# Deliberately broad (whole `androidx.media3.**`, not just `.common.**`) rather than relying on
# Media3's own consumer ProGuard rules: the by-name bridge reflects on the CONCRETE runtime type
# returned by SharedAudioPlayer.shared() — an ExoPlayer whose implementation lives in
# `androidx.media3.exoplayer` (ExoPlayerImpl), not `androidx.media3.common`. Scoping the keep to
# `.common.**` would leave the actually-reflected methods (getCurrentMediaItem / replaceMediaItem /
# getCurrentMediaItemIndex) on the impl class renamable, reintroducing the R8-strips-JNI-bridged-
# class crash. The keep is chosen over Media3's consumer rules for that reason.
-keep class androidx.media3.** { *; }
# ExoPlayerImpl is the concrete class the JNI bridge receives from SharedAudioPlayer.shared().
# Media3's own consumer ProGuard rules keep the rest of the public API.
-keep class androidx.media3.exoplayer.ExoPlayerImpl { *; }
-dontwarn androidx.media3.**
11 changes: 11 additions & 0 deletions Android/app/src/main/res/values-v35/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Android 15 (API 35) enforces edge-to-edge by default. We call enableEdgeToEdge()
in MainActivity.onCreate() and set transparent bar styles via SyncSystemBarsWithTheme(),
so we opt in explicitly here rather than relying on the platform default. -->
<style name="Theme.Maxi80" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="android:windowBackground">@android:color/black</item>
<item name="android:windowSplashScreenBackground">@android:color/black</item>
<item name="android:windowOptOutEdgeToEdgeEnforcement">false</item>
</style>
Comment thread
sebsto marked this conversation as resolved.
</resources>
2 changes: 1 addition & 1 deletion Sources/Maxi80Services/Skip/skip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ build:
- 'implementation("androidx.media3:media3-extractor:1.9.4")'
# Supplies androidx.core.app.NotificationCompat, used by Maxi80MediaService to build the
# MediaStyle foreground/lock-screen notification. Not pulled in transitively by media3.
- 'implementation("androidx.core:core-ktx:1.15.0")'
- 'implementation("androidx.core:core-ktx:1.16.0")'
- 'implementation("com.google.guava:guava:31.1-android")'
Loading