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

Commit aff0bc18 authored by Ricky Wai's avatar Ricky Wai
Browse files

Suppress expected exception due to missing network_watchlist.xml

Test: NULL
Bug:73264037
Change-Id: I640ad865fe85191f7d9e5fe887be10884c7bb801
parent b133cbfd
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);