Ensure RuntimeExceptions are also caught properly.

While reading the proto stats from disk, AppExitInfoTracker
can crash if a RuntimeException is thrown - update the catch logic.

Bug: 268301239
Change-Id: I76c86d844595674ef2171c13508adb710b151dae
Test: atest ApplicationExitInfoTest
(cherry picked from commit c1544d4df5)
This commit is contained in:
Varun Shah
2023-02-28 23:17:18 +00:00
parent 91bae30e7b
commit 63b0bde4e4

View File

@@ -674,7 +674,7 @@ public final class AppExitInfoTracker {
break;
}
}
} catch (IOException | IllegalArgumentException | WireTypeMismatchException e) {
} catch (Exception e) {
Slog.w(TAG, "Error in loading historical app exit info from persistent storage: " + e);
} finally {
if (fin != null) {