Keep all subclasses of PreferenceFragmentCompat (#3162)
* Mark *PreferencesFragment as @Keep PreferenceFragment references them by string name, which doesn't work after ProGuard has obfuscated the code in release mode. The name is no longer valid and the app crashes. Fixes https://github.com/tuskyapp/Tusky/issues/3161 * Prefer to keep Preference classes with a Proguard rule Ensures that all PreferenceFragmentCompat are kept, to prevent the risk that this could break in a new fragment where `@Keep` is accidentally omitted.
This commit is contained in:
parent
d6e7905e01
commit
f28252bfd5
1 changed files with 4 additions and 0 deletions
4
app/proguard-rules.pro
vendored
4
app/proguard-rules.pro
vendored
|
@ -111,3 +111,7 @@
|
|||
static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String, java.lang.String);
|
||||
static void throwUninitializedPropertyAccessException(java.lang.String);
|
||||
}
|
||||
|
||||
# Preference fragments can be referenced by name, ensure they remain
|
||||
# https://github.com/tuskyapp/Tusky/issues/3161
|
||||
-keep class * extends androidx.preference.PreferenceFragmentCompat
|
||||
|
|
Loading…
Reference in a new issue