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

Commit 2b9aae78 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Handle corrupt packages.xml"

parents b8a96301 45fb6c68
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -3162,6 +3162,17 @@ public final class Settings implements Watchable, Snappable {
            mReadMessages.append("Error reading: " + e.toString());
            PackageManagerService.reportSettingsProblem(Log.ERROR, "Error reading settings: " + e);
            Slog.wtf(PackageManagerService.TAG, "Error reading package manager settings", e);
        } finally {
            if (!mVersion.containsKey(StorageManager.UUID_PRIVATE_INTERNAL)) {
                Slog.wtf(PackageManagerService.TAG,
                        "No internal VersionInfo found in settings, using current.");
                findOrCreateVersion(StorageManager.UUID_PRIVATE_INTERNAL).forceCurrent();
            }
            if (!mVersion.containsKey(StorageManager.UUID_PRIMARY_PHYSICAL)) {
                Slog.wtf(PackageManagerService.TAG,
                        "No external VersionInfo found in settings, using current.");
                findOrCreateVersion(StorageManager.UUID_PRIMARY_PHYSICAL).forceCurrent();
            }
        }

        // If the build is setup to drop runtime permissions