Minified MPV initialization aborted because callback keep rules retained obsolete JNI signatures. Android TV IME dismissal also left editing active, requiring an extra Back press to leave the screen. Keep only the named JNI callbacks without duplicating argument signatures and exercise them through the permanent minified reachability gate. Centralize native editing-session termination, observe owning-view keyboard dismissal, and reject stale completion or reopening work. Verified the minified gate on Galaxy Z Fold3, debug MPV lifecycle and log-level suites on SHIELD and Pixel 7, native Done/Previous and two-Back behavior on SHIELD and Fire TV, 76 focused Flutter tests, analyzer parity, and shrinker checks. Both new regressions reject the original implementations.
19 lines
917 B
Prolog
19 lines
917 B
Prolog
# JNI exports bind by name (Java_com_edde746_plezy_libmpv_MpvPlayer_native*); keep the names stable.
|
|
-keepclasseswithmembernames class com.edde746.plezy.libmpv.* {
|
|
native <methods>;
|
|
}
|
|
|
|
# jni_utils.cpp caches MpvPlayer with FindClass and resolves these static callbacks
|
|
# with GetStaticMethodID on the native event thread. R8 sees no reference to the
|
|
# class name or the member names, so both must stay alive and un-renamed.
|
|
# Match callback names, return type and static access without duplicating JNI
|
|
# argument descriptors here: adding the session token made the old signatures
|
|
# silently stop matching. Native initialization resolves every exact descriptor.
|
|
-keep class com.edde746.plezy.libmpv.MpvPlayer {
|
|
public static void onPropertyChanged(...);
|
|
public static void onEvent(...);
|
|
public static void onEndFile(...);
|
|
public static void onLogMessage(...);
|
|
public static void onHook(...);
|
|
}
|