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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user