fix NoSuchFieldError (#5041)

This commit is contained in:
Rafael de Moura Dev authored and GitHub committed 2024-12-04 14:59:03 +08:00
1 parent 5f6a23a288
commit c82e5d5de1
4 files changed
+27 -7

No files matched your search

@@ -736,7 +736,13 @@ public class LoaderTask implements Runnable {
LauncherActivityInfo app = apps.get(i);
AppInfo appInfo = new AppInfo(app, mUserCache.getUserInfo(user),
ApiWrapper.INSTANCE.get(mApp.getContext()), mPmHelper, quietMode);
if (Flags.enableSupportForArchiving() && app.getApplicationInfo().isArchived) {
boolean isArchived;
try {
isArchived = app.getApplicationInfo().isArchived;
} catch (NoSuchFieldError e) {
isArchived = false;
}
if (Flags.enableSupportForArchiving() && isArchived) {
// For archived apps, include progress info in case there is a pending
// install session post restart of device.
String appPackageName = app.getApplicationInfo().packageName;