fix NoSuchFieldError (#5041)

This commit is contained in:
Rafael de Moura Dev
2024-12-04 03:59:03 -03:00
committed by GitHub
parent 5f6a23a288
commit c82e5d5de1
4 changed files with 27 additions and 7 deletions

View File

@@ -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;