Merge "NetworkAgent: Send primitive integer in score" am: 45190f8e7f

am: c039ad203e

Change-Id: I7f6ac7a5fd6ecae4ac077b7f54fe91879a63fa13
This commit is contained in:
Roshan Pius
2018-08-10 08:54:21 -07:00
committed by android-build-merger
2 changed files with 2 additions and 3 deletions

View File

@@ -372,7 +372,7 @@ public abstract class NetworkAgent extends Handler {
if (score < 0) {
throw new IllegalArgumentException("Score must be >= 0");
}
queueOrSendMessage(EVENT_NETWORK_SCORE_CHANGED, new Integer(score));
queueOrSendMessage(EVENT_NETWORK_SCORE_CHANGED, score, 0);
}
/**

View File

@@ -2194,8 +2194,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
break;
}
case NetworkAgent.EVENT_NETWORK_SCORE_CHANGED: {
Integer score = (Integer) msg.obj;
if (score != null) updateNetworkScore(nai, score.intValue());
updateNetworkScore(nai, msg.arg1);
break;
}
case NetworkAgent.EVENT_SET_EXPLICITLY_SELECTED: {