Remove unnecessary allocation+unboxing of objects. am: 46f0dd6 am: 4c89ae0

am: 1e222ff

* commit '1e222ff323abdf061a46bfb4d297780eadd0968d':
  Remove unnecessary allocation+unboxing of objects.

Change-Id: Ic48935549f7f9b13d5f0a2d98fc0979fbfc5a38b
This commit is contained in:
Narayan Kamath
2016-04-18 10:42:28 +00:00
committed by android-build-merger
2 changed files with 2 additions and 3 deletions

View File

@@ -1750,7 +1750,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
if(restoreDefaultNetworkDelayStr != null &&
restoreDefaultNetworkDelayStr.length() != 0) {
try {
return Integer.valueOf(restoreDefaultNetworkDelayStr);
return Integer.parseInt(restoreDefaultNetworkDelayStr);
} catch (NumberFormatException e) {
}
}

View File

@@ -548,8 +548,7 @@ public class NetworkDiagnostics {
mMeasurement.description += " src{" + getSocketAddressString() + "}";
// This needs to be fixed length so it can be dropped into the pre-canned packet.
final String sixRandomDigits =
Integer.valueOf(mRandom.nextInt(900000) + 100000).toString();
final String sixRandomDigits = String.valueOf(mRandom.nextInt(900000) + 100000);
mMeasurement.description += " qtype{" + mQueryType + "}"
+ " qname{" + sixRandomDigits + "-android-ds.metric.gstatic.com}";