Skip to content

Commit

Permalink
Fix regression issue: ZhihuPreference
Browse files Browse the repository at this point in the history
  • Loading branch information
shatyuka committed Oct 5, 2023
1 parent c9e3af2 commit b12cd18
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ public void init(ClassLoader classLoader) throws Throwable {
PreferenceManager = classLoader.loadClass("androidx.preference.i");
PreferenceInflater = classLoader.loadClass("androidx.preference.h");
setSharedPreferencesName = Helper.getMethodByParameterTypes(PreferenceManager, String.class);
addPreferencesFromResource = Helper.getMethodByParameterTypes(PreferenceFragmentCompat, int.class);
try {
addPreferencesFromResource = PreferenceFragmentCompat.getMethod("b", int.class);
} catch (NoSuchMethodException e2) {
addPreferencesFromResource = Helper.getMethodByParameterTypes(PreferenceFragmentCompat, int.class);
}
inflate = Helper.getMethodByParameterTypes(PreferenceInflater, XmlPullParser.class, PreferenceGroup);
}
getContext = BasePreferenceFragment.getMethod("getContext");
Expand Down

0 comments on commit b12cd18

Please sign in to comment.