Lines Matching refs:score

38  * can be filtered 3 ways: by NetworkCapabilities, by score and more complexly by
40 * or score forces re-evaluation of all current requests.
65 * msg.arg1 = score - the score of the any network currently satisfying this
67 * exceed this score it should not try to connect, holding the request
70 * or higher) score for this request, transmitted to each
72 * with the same NetworkRequest but an updated score.
74 * allowing for a better score in the future.
85 * Internally used to set our best-guess score.
86 * msg.arg1 = new score
157 public int score;
158 public boolean requested; // do we have a request outstanding, limited by score
160 public NetworkRequestInfo(NetworkRequest request, int score) {
162 this.score = score;
168 return "{" + request + ", score=" + score + ", requested=" + requested + "}";
173 protected void handleAddRequest(NetworkRequest request, int score) {
176 if (DBG) log("got request " + request + " with score " + score);
177 n = new NetworkRequestInfo(request, score);
180 if (VDBG) log("new score " + score + " for exisiting request " + request);
181 n.score = score;
183 if (VDBG) log(" my score=" + mScore + ", my filter=" + mCapabilityFilter);
197 private void handleSetScore(int score) {
198 mScore = score;
221 * If you want to see every score fluctuation on every request, set
222 * your score filter to a very high number and watch {@link #needNetworkFor}.
226 public boolean acceptRequest(NetworkRequest request, int score) {
232 if (n.requested == false && n.score < mScore &&
234 mCapabilityFilter) && acceptRequest(n.request, n.score)) {
236 needNetworkFor(n.request, n.score);
239 (n.score > mScore || n.request.networkCapabilities.satisfiedByNetworkCapabilities(
240 mCapabilityFilter) == false || acceptRequest(n.request, n.score) == false)) {
262 protected void needNetworkFor(NetworkRequest networkRequest, int score) {
271 public void addNetworkRequest(NetworkRequest networkRequest, int score) {
273 new NetworkRequestInfo(networkRequest, score)));
280 public void setScoreFilter(int score) {
281 sendMessage(obtainMessage(CMD_SET_SCORE, score, 0));