Lines Matching defs:network

48  * select an network for the phone to connect/roam to.
64 //buffer of filtered scan results (Scan results considered by network selection) & associated
72 //if current network is on 2.4GHz band and has a RSSI over this, need not new network selection
74 //if current network is on 5GHz band and has a RSSI over this, need not new network selection
138 * @return current target connected network
174 localLoge("No network score service: Couldn't register as a WiFi score Manager, type="
200 private String getNetworkString(WifiConfiguration network) {
201 if (network == null) {
205 return (network.SSID + ":" + network.networkId);
210 * check whether current network is good enough we need not consider any potential switch
212 * @param currentNetwork -- current connected network
213 * @return true -- qualified and do not consider potential network switch
214 * false -- not good enough and should try potential network switch
222 localLog("Current network is: " + currentNetwork.SSID + " ,ID is: "
226 //if current connected network is an ephemeral network,we will consider
227 // there is no current network
233 //if current network is open network, not qualified
235 localLog("Current network is open network");
239 // Current network band must match with user preference selection
289 //if switch network is not allowed in connected mode, do not trigger Qualified Network
292 localLog("Switch network under connection is not allowed");
317 //need not trigger Qualified Network Selection if current network is qualified
318 localLog("Current network is not qualified");
331 //Do not allow new network selection in other state
339 int calculateBssidScore(ScanResult scanResult, WifiConfiguration network,
368 //same network award
369 if (network == currentNetwork || network.isLinked(currentNetwork)) {
371 sbuf.append(" Same network with current associated. Bonus: "
382 if (network.isPasspoint()) {
385 } else if (!mWifiConfigManager.isOpenNetwork(network)) {
387 sbuf.append(" Secure network Bonus:" + mSecurityAward);
390 //Penalty for no internet network. Make sure if there is any network with Internet,
391 //however, if there is no any other network with internet, this network can be chosen
392 if (network.numNoInternetAccessReports > 0 && !network.validatedInternetAccess) {
399 + network.networkId + " final score:" + score + "\n\n");
405 * This API try to update all the saved networks' network selection status
410 localLog("no saved network");
415 for (WifiConfiguration network : savedNetworks) {
416 WifiConfiguration config = mWifiConfigManager.getWifiConfiguration(network.networkId);
422 mWifiConfigManager.tryEnableQualifiedNetwork(network.networkId);
431 sbuf.append(" " + getNetworkString(network) + " " + " User Preferred BSSID:"
432 + network.BSSID + " FQDN:" + network.FQDN + " "
446 * This API is called when user explicitly select a network. Currently, it is used in following
448 * (1) User explicitly choose to connect to a saved network
449 * (2) User save a network after add a new network
450 * (3) User save a network after modify a saved network
452 * 1. if this network is disabled, we need re-enable it again
453 * 2. we considered user prefer this network over all the networks visible in latest network
456 * @param netId new network ID for either the network the user choose or add
458 * @return true -- There is change made to connection choice of any saved network
459 * false -- There is no change made to connection choice of any saved network
486 for (WifiConfiguration network : savedNetworks) {
487 WifiConfiguration config = mWifiConfigManager.getWifiConfiguration(network.networkId);
587 * check whether a network slection is needed. If need, check all the new scan results and
588 * select a new qualified network/BSSID to connect to
590 * @param forceSelectNetwork true -- start a qualified network selection anyway,no matter
591 * current network is already qualified or not.
592 * false -- if current network is already qualified, do not do new
594 * @param isUntrustedConnectionsAllowed true -- user allow to connect to untrusted network
596 * network
606 * @return the qualified network candidate found. If no available candidate, return null
626 localLog("Quit qualified Network Selection since it is not forced and current network"
688 //check if there is already a score for this network
690 //no score for this network yet.
700 + " for network score. Skip.");
704 //check whether this scan result belong to a saved network
717 //if there are more than 1 associated network, it must be a passpoint network
718 WifiConfiguration network = associatedWifiConfigurations.get(0);
719 if (network.ephemeral) {
720 potentialEphemeralCandidate = network;
725 // Evaluate the potentially ephemeral network as a possible candidate if untrusted
733 // scanDetail is for available ephemeral network
741 // calculate the score of each scanresult whose associated network is not ephemeral. Due
742 // to one scan result can associated with more than 1 network, we need calculate all
748 for (WifiConfiguration network : associatedWifiConfigurations) {
750 network.getNetworkSelectionStatus();
753 potentialCandidate = network;
757 } else if (network.BSSID != null && !network.BSSID.equals("any")
758 && !network.BSSID.equals(scanResult.BSSID)) {
761 localLog("Network: " + getNetworkString(network) + " has specified" + "BSSID:"
762 + network.BSSID + ". Skip " + scanResult.BSSID);
766 // If the network is marked to use external scores then attempt to fetch the score.
768 if (network.useExternalScores) {
770 externalScoreEvaluator.evalSavedCandidate(netScore, network, scanResult);
774 score = calculateBssidScore(scanResult, network, mCurrentConnectedNetwork,
777 == network.networkId), scoreHistory);
780 configurationCandidateForThisScan = network;
781 potentialCandidate = network;
806 //kick the score manager if there is any unscored network
888 * Returns the best candidate network according to the given ExternalScoreEvaluator.
910 localLog(String.format("new ephemeral candidate %s network ID:%d, "
924 localLog(String.format("new scored candidate %s network ID:%d",
940 * Returns the available external network score or NULL if no score is available.
942 * @param scanResult The scan result of the network to score.
943 * @param isActiveNetwork Whether or not the network is currently connected.
1005 // Determines whether or not the given saved network is the best one its seen so far.
1008 // Always take the highest score. If there's a tie and an untrusted network is currently
1009 // the best then pick the saved network.
1018 localLog(toScanId(scanResult) + " become the new externally scored saved network "