Merge "Don't resume PowerStatsDataStorage read on Exception" into sc-dev am: b1c1ae9517 am: 50df41af58

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15388825

Change-Id: I69de9446ee2126e2e5125e37ca8c04a946c6d352
This commit is contained in:
TreeHugger Robot
2021-08-13 03:01:24 +00:00
committed by Automerger Merge Worker

View File

@@ -124,12 +124,8 @@ public class PowerStatsDataStorage {
@Override @Override
public void read(InputStream in) throws IOException { public void read(InputStream in) throws IOException {
while (in.available() > 0) { while (in.available() > 0) {
try {
DataElement dataElement = new DataElement(in); DataElement dataElement = new DataElement(in);
mCallback.onReadDataElement(dataElement.getData()); mCallback.onReadDataElement(dataElement.getData());
} catch (IOException e) {
Slog.e(TAG, "Failed to read from storage. " + e.getMessage());
}
} }
} }
} }