# 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. 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 and androidx's MediaButtonReceiver are declared in this
# module's AndroidManifest.xml, so AGP's own merged-manifest keep rules hold
# them by name. Not repeated here: one place decides each of them.
-keep class com.soulstream.mediasession.MediaSessionPlugin { *; }
-keep class com.soulstream.mediasession.NowPlayingArgs { *; }
