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

Commit fcfc753a authored by Ricky Wai's avatar Ricky Wai Committed by Android (Google) Code Review
Browse files

Merge "Suppress expected exception due to missing network_watchlist.xml" into pi-dev

parents abe80b8d aff0bc18
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -107,6 +107,10 @@ class WatchlistConfig {
     * Reload watchlist by reading config file.
     */
    public void reloadConfig() {
        if (!mXmlFile.exists()) {
            // No config file
            return;
        }
        try (FileInputStream stream = new FileInputStream(mXmlFile)){
            final List<byte[]> crc32DomainList = new ArrayList<>();
            final List<byte[]> sha256DomainList = new ArrayList<>();
+5 −1
Original line number Diff line number Diff line
@@ -87,6 +87,10 @@ class WatchlistSettings {
    }

    public void reloadSettings() {
        if (!mXmlFile.exists()) {
            // No settings config
            return;
        }
        try (FileInputStream stream = mXmlFile.openRead()){
            XmlPullParser parser = Xml.newPullParser();
            parser.setInput(stream, StandardCharsets.UTF_8.name());
@@ -97,7 +101,7 @@ class WatchlistSettings {
                    mPrivacySecretKey = parseSecretKey(parser);
                }
            }
            Log.i(TAG, "Reload watchlist settings done");
            Slog.i(TAG, "Reload watchlist settings done");
        } catch (IllegalStateException | NullPointerException | NumberFormatException |
                XmlPullParserException | IOException | IndexOutOfBoundsException e) {
            Slog.e(TAG, "Failed parsing xml", e);