HACK: make Resources.mDrawableCache of type ThemedResourceCache, but only for F-Droid

This field is directly accessed by androidx and some androidx version
expect it to be a Map while other expect a ThemedResourceCache. This
mess is probably caused by reporting an age old Build.SDK_INT.
This commit is contained in:
Julian Winkler
2025-03-25 18:56:20 +01:00
parent df4d4721ce
commit 820b9d7ec5
2 changed files with 16 additions and 1 deletions

View File

@@ -125,6 +125,8 @@ public class Context extends Object {
application_info.nativeLibraryDir = (new File(Environment.getExternalStorageDirectory(), "lib")).getAbsolutePath();
application_info.sourceDir = native_get_apk_path();
package_manager = new PackageManager();
r.applyPackageQuirks(application_info.packageName);
}
private static native String native_get_apk_path();