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

Commit 5dea7d55 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Skip packages with missing metadata.

Otherwise this would result in NPE, and packages.list would never
be updated.

Bug: 10577538
Change-Id: I35a4407dbc283ab20a4c45a2ea1a14b04044c98c
parent 118cb035
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1385,6 +1385,11 @@ final class Settings {

                StringBuilder sb = new StringBuilder();
                for (final PackageSetting pkg : mPackages.values()) {
                    if (pkg.pkg == null || pkg.pkg.applicationInfo == null) {
                        Slog.w(TAG, "Skipping " + pkg + " due to missing metadata");
                        continue;
                    }

                    final ApplicationInfo ai = pkg.pkg.applicationInfo;
                    final String dataPath = ai.dataDir;
                    final boolean isDebug = (ai.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;