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

Commit f529541e authored by Song Chun Fan's avatar Song Chun Fan Committed by Gerrit Code Review
Browse files

Merge "Catch IllegalArgumentException as it might indicate corrupted packages.xml" into main

parents 729b91d1 f160eeba
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -3194,12 +3194,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile

                    } else if (tagName.equals("verifier")) {
                        final String deviceIdentity = parser.getAttributeValue(null, "device");
                        try {
                        mVerifierDeviceIdentity = VerifierDeviceIdentity.parse(deviceIdentity);
                        } catch (IllegalArgumentException e) {
                            Slog.w(PackageManagerService.TAG, "Discard invalid verifier device id: "
                                    + e.getMessage());
                        }
                    } else if (TAG_READ_EXTERNAL_STORAGE.equals(tagName)) {
                        // No longer used.
                    } else if (tagName.equals("keyset-settings")) {
@@ -3228,7 +3223,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
                }

                str.close();
            } catch (IOException | XmlPullParserException e) {
            } catch (IOException | XmlPullParserException | IllegalArgumentException e) {
                // Remove corrupted file and retry.
                atomicFile.failRead(str, e);