Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0cfe875a authored by narayan's avatar narayan
Browse files

Fix NPE in PackageManagerService.

Check that each package from the setting has
a parsed pkg before we attempt to perform dex-opt
on it. If it doesn't have a parsed package, adjust
the ABI in the settings, but don't perform dexopt.
It will be dexopted later if it's still active
based on the setting.

bug: 15081286

Change-Id: Ifb6d1d5efdc9c59b251731972afa951ad930d05c
parent bc06158a
Loading
Loading
Loading
Loading
+12 −10
Original line number Diff line number Diff line
@@ -5682,6 +5682,7 @@ public class PackageManagerService extends IPackageManager.Stub {
                    }
                    ps.cpuAbiString = adjustedAbi;
                    if (ps.pkg != null && ps.pkg.applicationInfo != null) {
                        ps.pkg.applicationInfo.cpuAbi = adjustedAbi;
                        Slog.i(TAG, "Adjusting ABI for : " + ps.name + " to " + adjustedAbi);
@@ -5695,6 +5696,7 @@ public class PackageManagerService extends IPackageManager.Stub {
                    }
                }
            }
        }
        return true;
    }