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

Commit f22a50b4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 2613f65e 49e7f332
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -3386,12 +3386,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")) {
@@ -3419,7 +3414,8 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
                }

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