Wholphin/app/proguard-rules.pro
Damontecres f74306a12c
Fix subtitle outline width not applying in release builds (#1687)
## Description
Fix applying the subtitle outline width in ExoPlayer for release builds

The outline width field isn't public, so reflection is used to bypass
and modify it. Since proguard/r8 renames all of the classes and fields,
this meant the field was no longer found. The fix is to have proguard
preserve the necessary field names.

### Related issues
Fixes #1681

### Testing
Emulator w/ release build

## Screenshots
N/a

## AI or LLM usage
None
2026-07-11 13:21:41 -04:00

24 lines
761 B
Prolog

-keepattributes SourceFile,LineNumberTable
-keep class com.github.damontecres.wholphin.mpv.MPVLib { *; }
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }
-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
<fields>;
<methods>;
}
-dontwarn com.google.protobuf.**
# TODO investigate using smaller scope
-keep class com.google.common.cache.** { *; }
# Media3SubtitleOverride uses reflection to access/modify these fields
-keep class androidx.media3.ui.SubtitleView {
private androidx.media3.ui.SubtitleView$Output output;
}
-keep class androidx.media3.ui.CanvasSubtitleOutput {
private final java.util.List painters;
}
-keep class androidx.media3.ui.SubtitlePainter {
private final float outlineWidth;
}