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

Commit 89ccdb6b authored by Varun Shah's avatar Varun Shah
Browse files

Ensure RuntimeExceptions are also caught properly.

While reading the new proto stats, SyncStorageEngine can crash
if a RuntimeException is thrown - update the catch logic.

Bug: 242320010
Test: atest SyncStorageEngineTest
Change-Id: I1bf0ec8bae62f3f8840ad3015d71179729e407d1
parent 7144d64e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2083,7 +2083,7 @@ public class SyncStorageEngine {
            try (FileInputStream in = mStatusFile.openRead()) {
                readStatusInfoLocked(in);
            }
        } catch (IOException e) {
        } catch (Exception e) {
            Slog.e(TAG, "Unable to read status info file.", e);
        }
    }
@@ -2483,7 +2483,7 @@ public class SyncStorageEngine {
            try (FileInputStream in = mStatisticsFile.openRead()) {
                readDayStatsLocked(in);
            }
        } catch (IOException e) {
        } catch (Exception e) {
            Slog.e(TAG, "Unable to read day stats file.", e);
        }
    }