Prevent crash in recent app list
In some situations if you have recently used an app and then uninstalled it, the display of recent apps in Settings->Apps & notifications would crash. This is due to a bug in recent CL that fixed b/71591298. Test: make -j64 RunSettingsRoboTests Change-Id: Id04b073b2617eeff0e188b10d3743496a9f70d5e Fixes: 72340364
This commit is contained in:
@@ -325,7 +325,7 @@ public class RecentAppsPreferenceController extends AbstractPreferenceController
|
||||
// Not visible on launcher -> likely not a user visible app, skip if non-instant.
|
||||
final ApplicationsState.AppEntry appEntry =
|
||||
mApplicationsState.getEntry(pkgName, mUserId);
|
||||
if (!AppUtils.isInstant(appEntry.info)) {
|
||||
if (appEntry == null || appEntry.info == null || !AppUtils.isInstant(appEntry.info)) {
|
||||
Log.d(TAG, "Not a user visible or instant app, skipping " + pkgName);
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user