Merge "Track constructor changes in libcore/" am: f94eb29500
am: 33a26e3ee4
Change-Id: I1205219e1fead95ecdb8f9ce5d503ec416baf4c2
This commit is contained in:
commit
fa52de540c
1 changed files with 9 additions and 3 deletions
|
|
@ -194,7 +194,7 @@ public class NetworkStatsFactory {
|
|||
reader.finishLine();
|
||||
}
|
||||
} catch (NullPointerException|NumberFormatException e) {
|
||||
throw new ProtocolException("problem parsing stats", e);
|
||||
throw protocolExceptionWithCause("problem parsing stats", e);
|
||||
} finally {
|
||||
IoUtils.closeQuietly(reader);
|
||||
StrictMode.setThreadPolicy(savedPolicy);
|
||||
|
|
@ -244,7 +244,7 @@ public class NetworkStatsFactory {
|
|||
reader.finishLine();
|
||||
}
|
||||
} catch (NullPointerException|NumberFormatException e) {
|
||||
throw new ProtocolException("problem parsing stats", e);
|
||||
throw protocolExceptionWithCause("problem parsing stats", e);
|
||||
} finally {
|
||||
IoUtils.closeQuietly(reader);
|
||||
StrictMode.setThreadPolicy(savedPolicy);
|
||||
|
|
@ -341,7 +341,7 @@ public class NetworkStatsFactory {
|
|||
reader.finishLine();
|
||||
}
|
||||
} catch (NullPointerException|NumberFormatException e) {
|
||||
throw new ProtocolException("problem parsing idx " + idx, e);
|
||||
throw protocolExceptionWithCause("problem parsing idx " + idx, e);
|
||||
} finally {
|
||||
IoUtils.closeQuietly(reader);
|
||||
StrictMode.setThreadPolicy(savedPolicy);
|
||||
|
|
@ -378,4 +378,10 @@ public class NetworkStatsFactory {
|
|||
|
||||
@VisibleForTesting
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue