# Consumer R8/ProGuard rules for the media-session plugin. Inert unless the # consuming app minifies, and only the `release` build type does, so the # debug APK the deploy pipeline builds is untouched by this file. # # MediaSessionPlugin is found by the string # "com/soulstream/mediasession/MediaSessionPlugin" (register_android_plugin → # FindClass), constructed through "(Landroid/app/Activity;)V", and its two # @Command methods — update and clear — are dispatched by NAME through # PluginHandle's commands map. NowPlayingArgs is filled by Jackson field by # field, and QueueItemArgs — one per entry of the queue window it carries — # the same way. Rename any of it and the app still builds, installs and # plays; the lock-screen card simply never appears. # # The other half of this plugin is in the app-wide file: the card's buttons # come back as the plugin event "action", which the WebView subscribes to # through Plugin.registerListener — declared on tauri's base class, which no # rule of tauri's own names. See src-tauri/android/proguard-soulstream.pro. # # MediaService is declared in this module's AndroidManifest.xml, so AGP's # own merged-manifest keep rules hold it by name, and SoulStreamPlayer, # MediaHub and LibraryTree need no rule of their own — the only thing that # reaches any of them is a direct reference from MediaService. # androidx's MediaButtonReceiver went with the move to media3: the # service's own filter routes media buttons now — through the # MediaLibraryService action, which MediaSessionLegacyStub queries first — # and two receivers would have fought over them. -keep class com.soulstream.mediasession.MediaSessionPlugin { *; } -keep class com.soulstream.mediasession.NowPlayingArgs { *; } -keep class com.soulstream.mediasession.QueueItemArgs { *; }