Merge "Track constructor changes in libcore/" am: f94eb29500 am: 33a26e3ee4

am: fa52de540c

Change-Id: I7e7115799180d17e4ad6468e155aed79fc8600cb
This commit is contained in:
Neil Fuller
2018-07-05 05:34:45 -07:00
committed by android-build-merger

View File

@@ -194,7 +194,7 @@ public class NetworkStatsFactory {
reader.finishLine(); reader.finishLine();
} }
} catch (NullPointerException|NumberFormatException e) { } catch (NullPointerException|NumberFormatException e) {
throw new ProtocolException("problem parsing stats", e); throw protocolExceptionWithCause("problem parsing stats", e);
} finally { } finally {
IoUtils.closeQuietly(reader); IoUtils.closeQuietly(reader);
StrictMode.setThreadPolicy(savedPolicy); StrictMode.setThreadPolicy(savedPolicy);
@@ -244,7 +244,7 @@ public class NetworkStatsFactory {
reader.finishLine(); reader.finishLine();
} }
} catch (NullPointerException|NumberFormatException e) { } catch (NullPointerException|NumberFormatException e) {
throw new ProtocolException("problem parsing stats", e); throw protocolExceptionWithCause("problem parsing stats", e);
} finally { } finally {
IoUtils.closeQuietly(reader); IoUtils.closeQuietly(reader);
StrictMode.setThreadPolicy(savedPolicy); StrictMode.setThreadPolicy(savedPolicy);
@@ -341,7 +341,7 @@ public class NetworkStatsFactory {
reader.finishLine(); reader.finishLine();
} }
} catch (NullPointerException|NumberFormatException e) { } catch (NullPointerException|NumberFormatException e) {
throw new ProtocolException("problem parsing idx " + idx, e); throw protocolExceptionWithCause("problem parsing idx " + idx, e);
} finally { } finally {
IoUtils.closeQuietly(reader); IoUtils.closeQuietly(reader);
StrictMode.setThreadPolicy(savedPolicy); StrictMode.setThreadPolicy(savedPolicy);
@@ -378,4 +378,10 @@ public class NetworkStatsFactory {
@VisibleForTesting @VisibleForTesting
public static native int nativeReadNetworkStatsDev(NetworkStats stats); public static native int nativeReadNetworkStatsDev(NetworkStats stats);
private static ProtocolException protocolExceptionWithCause(String message, Throwable cause) {
ProtocolException pe = new ProtocolException(message);
pe.initCause(cause);
return pe;
}
} }