/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/ |
ShadowScanResultTest.java | 7 import android.net.wifi.ScanResult; 17 ScanResult scanResult = ShadowScanResult.newInstance("SSID", "BSSID", "Caps", 11, 42); 18 assertThat(scanResult.SSID).isEqualTo("SSID"); 19 assertThat(scanResult.BSSID).isEqualTo("BSSID"); 20 assertThat(scanResult.capabilities).isEqualTo("Caps"); 21 assertThat(scanResult.level).isEqualTo(11); 22 assertThat(scanResult.frequency).isEqualTo(42); 23 assertNotNull(shadowOf(scanResult).realObject);
|
/external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowScanResult.java | 3 import android.net.wifi.ScanResult; 9 @Implements(ScanResult.class) 12 @RealObject ScanResult realObject; 14 public static ScanResult newInstance(String SSID, String BSSID, String caps, int level, int frequency) { 15 ScanResult scanResult = Robolectric.newInstanceOf(ScanResult.class); 16 scanResult.SSID = SSID; 17 scanResult.BSSID = BSSID; 18 scanResult.capabilities = caps [all...] |
/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/ |
ScanResultTest.java | 3 import android.net.wifi.ScanResult; 18 ScanResult scanResult = ShadowScanResult.newInstance("SSID", "BSSID", "Caps", 11, 42); 19 assertThat(scanResult.SSID, equalTo("SSID")); 20 assertThat(scanResult.BSSID, equalTo("BSSID")); 21 assertThat(scanResult.capabilities, equalTo("Caps")); 22 assertThat(scanResult.level, equalTo(11)); 23 assertThat(scanResult.frequency, equalTo(42)); 24 assertNotNull(shadowOf(scanResult).realObject);
|
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/ |
ShadowScanResult.java | 3 import android.net.wifi.ScanResult; 9 @Implements(ScanResult.class) 12 @RealObject ScanResult realObject; 14 public static ScanResult newInstance(String SSID, String BSSID, String caps, int level, int frequency) { 15 ScanResult scanResult = Shadow.newInstanceOf(ScanResult.class); 16 scanResult.SSID = SSID; 17 scanResult.BSSID = BSSID; 18 scanResult.capabilities = caps [all...] |
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/wificond/ |
NativeScanResultTest.java | 59 NativeScanResult scanResult = new NativeScanResult(); 60 scanResult.ssid = TEST_SSID; 61 scanResult.bssid = TEST_BSSID; 62 scanResult.infoElement = TEST_INFO_ELEMENT; 63 scanResult.frequency = TEST_FREQUENCY; 64 scanResult.signalMbm = TEST_SIGNAL_MBM; 65 scanResult.tsf = TEST_TSF; 66 scanResult.capability = TEST_CAPABILITY; 67 scanResult.associated = TEST_ASSOCIATED; 68 scanResult.radioChainInfos = new ArrayList [all...] |
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/wifi/ |
WifiJsonParser.java | 19 import static android.net.wifi.ScanResult.FLAG_80211mc_RESPONDER; 20 import static android.net.wifi.ScanResult.FLAG_PASSPOINT_NETWORK; 22 import android.net.wifi.ScanResult; 39 * Converts a JSON representation of a ScanResult to an actual ScanResult object. Mirror of 41 * {@link com.googlecode.android_scripting.jsonrpc.JsonBuilder#buildJsonScanResult(ScanResult)}. 43 * @param j JSON object representing a ScanResult. 44 * @return a ScanResult object 47 public static ScanResult getScanResult(JSONObject j) throws JSONException { 52 ScanResult scanResult = new ScanResult() [all...] |
/system/connectivity/wificond/tests/ |
offload_test_utils.cpp | 22 using android::hardware::wifi::offload::V1_0::ScanResult; 36 std::vector<ScanResult> OffloadTestUtils::createOffloadScanResults() { 37 std::vector<ScanResult> scanResults; 38 ScanResult scanResult; 40 scanResult.tsf = kTsf; 41 scanResult.rssi = kRssi; 42 scanResult.frequency = kFrequency1; 43 scanResult.capability = kCapability; 44 memcpy(&scanResult.bssid[0], &kBssid[0], kBssidSize) [all...] |
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/ |
ScanResultUtilTest.java | 21 import android.net.wifi.ScanResult; 22 import android.net.wifi.ScanResult.InformationElement; 44 ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid, 60 ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid, 76 ScanResult input = new ScanResult(ssid, "ab:cd:01:ef:45:89", 1245, 0, "other caps", 90 ScanResult scanResult = new ScanResult(ssid, "ab:cd:01:ef:45:89", 1245, 0, "" [all...] |
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/setup/ |
AddPageBasedOnNetworkState.java | 20 import android.net.wifi.ScanResult; 54 ScanResult scanResult = mUserChoiceInfo.getChosenNetwork(); 62 int wifiSecurity = WifiSecurityUtil.getSecurity(scanResult); 65 scanResult.SSID,
|
/developers/build/prebuilts/gradle/BluetoothAdvertisements/Application/src/main/java/com/example/android/bluetoothadvertisements/ |
ScanResultAdapter.java | 19 import android.bluetooth.le.ScanResult; 32 * Holds and displays {@link ScanResult}s, used by {@link ScannerFragment}. 36 private ArrayList<ScanResult> mArrayList; 76 ScanResult scanResult = mArrayList.get(position); 78 String name = scanResult.getDevice().getName(); 83 deviceAddressView.setText(scanResult.getDevice().getAddress()); 84 lastSeenView.setText(getTimeSinceString(mContext, scanResult.getTimestampNanos())); 105 * Add a ScanResult item to the adapter if a result from that device isn't already present. 106 * Otherwise updates the existing position with the new ScanResult [all...] |
/developers/samples/android/connectivity/bluetooth/BluetoothAdvertisements/Application/src/main/java/com/example/android/bluetoothadvertisements/ |
ScanResultAdapter.java | 19 import android.bluetooth.le.ScanResult; 32 * Holds and displays {@link ScanResult}s, used by {@link ScannerFragment}. 36 private ArrayList<ScanResult> mArrayList; 76 ScanResult scanResult = mArrayList.get(position); 78 String name = scanResult.getDevice().getName(); 83 deviceAddressView.setText(scanResult.getDevice().getAddress()); 84 lastSeenView.setText(getTimeSinceString(mContext, scanResult.getTimestampNanos())); 105 * Add a ScanResult item to the adapter if a result from that device isn't already present. 106 * Otherwise updates the existing position with the new ScanResult [all...] |
/development/samples/browseable/BluetoothAdvertisements/src/com.example.android.bluetoothadvertisements/ |
ScanResultAdapter.java | 19 import android.bluetooth.le.ScanResult; 32 * Holds and displays {@link ScanResult}s, used by {@link ScannerFragment}. 36 private ArrayList<ScanResult> mArrayList; 76 ScanResult scanResult = mArrayList.get(position); 78 String name = scanResult.getDevice().getName(); 83 deviceAddressView.setText(scanResult.getDevice().getAddress()); 84 lastSeenView.setText(getTimeSinceString(mContext, scanResult.getTimestampNanos())); 105 * Add a ScanResult item to the adapter if a result from that device isn't already present. 106 * Otherwise updates the existing position with the new ScanResult [all...] |
/frameworks/base/core/tests/coretests/src/android/net/ |
NetworkKeyTest.java | 7 import android.net.wifi.ScanResult; 93 ScanResult scanResult = new ScanResult(); 94 scanResult.BSSID = VALID_BSSID; 96 assertNull(NetworkKey.createFromScanResult(scanResult)); 101 ScanResult scanResult = new ScanResult(); 102 scanResult.wifiSsid = WifiSsid.createFromAsciiEncoded("") [all...] |
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/ |
WifiUtilsTest.java | 29 import android.net.wifi.ScanResult; 79 ArrayList<ScanResult> scanResults = buildScanResultCache(); 84 when(mockWifiNetworkScoreCache.getScoredNetwork(any(ScanResult.class))) 98 Set<ScanResult> set = new ArraySet<>(); 150 private static ArrayList<ScanResult> buildScanResultCache() { 151 ArrayList<ScanResult> scanResults = new ArrayList<>(); 153 ScanResult scanResult = createScanResult(TEST_SSID, "bssid-" + i, i); 154 scanResults.add(scanResult); 159 private static ScanResult createScanResult(String ssid, String bssid, int rssi) [all...] |
/frameworks/base/wifi/tests/src/android/net/wifi/ |
ScanResultTest.java | 63 * Verify parcel read/write for ScanResult. 67 ScanResult writeScanResult = createScanResult(); 68 ScanResult readScanResult = parcelReadWrite(writeScanResult); 73 * Verify parcel read/write for ScanResult. 77 ScanResult writeScanResult = createScanResult(); 78 writeScanResult.radioChainInfos = new ScanResult.RadioChainInfo[0]; 79 ScanResult readScanResult = parcelReadWrite(writeScanResult); 84 * Verify parcel read/write for ScanResult. 88 ScanResult writeScanResult = createScanResult(); 89 writeScanResult.radioChainInfos = new ScanResult.RadioChainInfo[2] [all...] |
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
WakeupEvaluatorTest.java | 24 import android.net.wifi.ScanResult; 56 private ScanResult makeScanResult(String ssid, int frequency, int level) { 57 ScanResult scanResult = new ScanResult(); 58 scanResult.SSID = ssid; 59 scanResult.frequency = frequency; 60 scanResult.level = level; 61 scanResult.capabilities = "[]"; 63 return scanResult; [all...] |
WifiNetworkSelectorTestUtil.java | 29 import android.net.wifi.ScanResult; 104 ScanResult chosenScanResult, WifiConfiguration chosenCandidate) { 230 anyInt(), any(ScanResult.class), anyInt())) 232 public boolean answer(int netId, ScanResult scanResult, int score) { 234 configs[netId].getNetworkSelectionStatus().setCandidate(scanResult); 328 ScanResult scanResult = scanDetail.getScanResult(); 329 WifiKey wifiKey = new WifiKey("\"" + scanResult.SSID + "\"", scanResult.BSSID) [all...] |
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/connectivity/setup/ |
AddPageBasedOnNetworkStateTest.java | 27 import android.net.wifi.ScanResult; 81 ScanResult scanResult = new ScanResult(); 82 scanResult.SSID = "atv01"; 83 scanResult.capabilities = ""; 84 mUserChoiceInfo.setChosenNetwork(scanResult); 98 ScanResult scanResult = new ScanResult(); [all...] |
/frameworks/base/libs/androidfw/ |
Asset.cpp | 196 bool scanResult; 221 scanResult = ZipUtils::examineGzip(fp, &method, &uncompressedLen, 225 if (!scanResult) {
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
SavedNetworkEvaluator.java | 20 import android.net.wifi.ScanResult; 153 private int calculateBssidScore(ScanResult scanResult, WifiConfiguration network, 157 boolean is5GHz = scanResult.is5GHz(); 159 sbuf.append("[ ").append(scanResult.SSID).append(" ").append(scanResult.BSSID) 160 .append(" RSSI:").append(scanResult.level).append(" ] "); 162 int rssiSaturationThreshold = mScoringParams.getGoodRssi(scanResult.frequency); 163 int rssi = scanResult.level < rssiSaturationThreshold ? scanResult.leve [all...] |
ScoredNetworkEvaluator.java | 25 import android.net.wifi.ScanResult; 94 ScanResult scanResult = scanDetails.get(i).getScanResult(); 95 NetworkKey networkKey = NetworkKey.createFromScanResult(scanResult); 97 // Is there a ScoredNetwork for this ScanResult? If not, request a score. 138 ScanResult scanResult = scanDetail.getScanResult(); 139 if (scanResult == null) continue; 141 ScanResultUtil.createQuotedSSID(scanResult.SSID))) { 142 debugLog("Ignoring disabled ephemeral SSID: " + scanResult.SSID) [all...] |
WifiNetworkSelector.java | 23 import android.net.wifi.ScanResult; 194 ScanResult result = detail.getScanResult(); 245 * Format the given ScanResult as a scan ID for logging. 247 public static String toScanId(@Nullable ScanResult scanResult) { 248 return scanResult == null ? "NULL" 249 : String.format("%s:%s", scanResult.SSID, scanResult.BSSID); 264 * Compares ScanResult level against the minimum threshold for its band, returns true if lower 266 public boolean isSignalTooWeak(ScanResult scanResult) [all...] |
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
PasspointNetworkScoreTest.java | 23 import android.net.wifi.ScanResult; 316 // Setup ScanResult. 317 ScanResult scanResult = new ScanResult(); 318 scanResult.level = -60; 327 when(scanDetail.getScanResult()).thenReturn(scanResult);
|
/frameworks/base/tools/aapt/ |
ZipFile.cpp | 464 bool scanResult; 468 scanResult = ZipUtils::examineGzip(inputFp, &method, &uncompressedLen, 470 if (!scanResult || method != ZipEntry::kCompressDeflated) { [all...] |
/frameworks/base/wifi/tests/src/android/net/wifi/rtt/ |
WifiRttManagerTest.java | 29 import android.net.wifi.ScanResult; 127 // Note: not validating parcel code of ScanResult (assumed to work) 128 ScanResult scanResult1 = new ScanResult(); 130 ScanResult scanResult2 = new ScanResult(); 132 ScanResult scanResult3 = new ScanResult(); 134 List<ScanResult> scanResults2and3 = new ArrayList<>(2); 165 ScanResult scanResult = new ScanResult() [all...] |