Home
last modified time | relevance | path

Searched refs:wepKeys (Results 1 – 25 of 27) sorted by relevance

12

/packages/modules/Wifi/service/java/com/android/server/wifi/
DWifiConfigurationUtil.java93 public static boolean hasAnyValidWepKey(String[] wepKeys) { in hasAnyValidWepKey() argument
94 for (int i = 0; i < wepKeys.length; i++) { in hasAnyValidWepKey()
95 if (wepKeys[i] != null) { in hasAnyValidWepKey()
346 if (!Arrays.equals(existingConfig.wepKeys, newConfig.wepKeys)) { in hasCredentialChanged()
504 private static boolean validateWepKeys(String[] wepKeys, int wepTxKeyIndex, boolean isAdd) { in validateWepKeys() argument
506 if (wepKeys == null) { in validateWepKeys()
511 if (wepKeys == null) { in validateWepKeys()
516 for (int i = 0; i < wepKeys.length; i++) { in validateWepKeys()
517 if (wepKeys[i] != null && !TextUtils.equals(wepKeys[i], PASSWORD_MASK)) { in validateWepKeys()
528 for (int i = 0; i < wepKeys.length; i++) { in validateWepKeys()
[all …]
DWifiBackupDataV1Parser.java345 populateWepKeysFromXmlValue(value, configuration.wepKeys); in parseWifiConfigurationFromXmlInternal()
434 private static void populateWepKeysFromXmlValue(Object value, String[] wepKeys) in populateWepKeysFromXmlValue() argument
440 if (wepKeysInData.length != wepKeys.length) { in populateWepKeysFromXmlValue()
444 for (int i = 0; i < wepKeys.length; i++) { in populateWepKeysFromXmlValue()
446 wepKeys[i] = null; in populateWepKeysFromXmlValue()
448 wepKeys[i] = wepKeysInData[i]; in populateWepKeysFromXmlValue()
DWifiBackupRestore.java683 configuration.wepKeys[0] = in createWifiConfiguration()
687 configuration.wepKeys[1] = in createWifiConfiguration()
691 configuration.wepKeys[2] = in createWifiConfiguration()
695 configuration.wepKeys[3] = in createWifiConfiguration()
DWifiConfigManager.java626 if (configuration.wepKeys != null) { in maskPasswordsInWifiConfiguration()
627 for (int i = 0; i < configuration.wepKeys.length; i++) { in maskPasswordsInWifiConfiguration()
628 if (!TextUtils.isEmpty(configuration.wepKeys[i])) { in maskPasswordsInWifiConfiguration()
629 configuration.wepKeys[i] = PASSWORD_MASK; in maskPasswordsInWifiConfiguration()
1063 if (externalConfig.wepKeys != null) { in mergeWithInternalWifiConfiguration()
1065 for (int i = 0; i < internalConfig.wepKeys.length; i++) { in mergeWithInternalWifiConfiguration()
1066 if (externalConfig.wepKeys[i] != null in mergeWithInternalWifiConfiguration()
1067 && !externalConfig.wepKeys[i].equals(PASSWORD_MASK)) { in mergeWithInternalWifiConfiguration()
1068 internalConfig.wepKeys[i] = externalConfig.wepKeys[i]; in mergeWithInternalWifiConfiguration()
DSupplicantStaNetworkHal.java211 config.wepKeys[i] = null; in loadWifiConfiguration()
213 config.wepKeys[i] = NativeUtil.bytesToHexOrQuotedString(mWepKey); in loadWifiConfiguration()
402 if (config.wepKeys != null) { in saveWifiConfiguration()
403 for (int i = 0; i < config.wepKeys.length; i++) { in saveWifiConfiguration()
404 if (config.wepKeys[i] != null) { in saveWifiConfiguration()
406 i, NativeUtil.hexOrQuotedStringToBytes(config.wepKeys[i]))) { in saveWifiConfiguration()
/packages/modules/Wifi/framework/tests/src/android/net/wifi/
DWifiConfigurationTest.java162 config.wepKeys = null; in testIsOpenNetwork_IsOpen_NullWepKeys()
171 config.wepKeys = new String[0]; in testIsOpenNetwork_IsOpen_ZeroLengthWepKeysArray()
180 config.wepKeys = new String[1]; in testIsOpenNetwork_IsOpen_NullWepKeysArray()
189 config.wepKeys = new String[] {"test"}; in testIsOpenNetwork_NotOpen_HasWepKeys()
198 config.wepKeys = new String[] {null, null, "test"}; in testIsOpenNetwork_NotOpen_HasNullWepKeyFollowedByNonNullKey()
219 config.wepKeys = null; in testIsOpenNetwork_NotOpen_HasAuthType()
231 config.wepKeys = null; in testIsOpenNetwork_NotOpen_HasAuthTypeNoneAndMore()
405 config.wepKeys[0] = "TestWep"; in testGetSsidAndSecurityTypeString()
410 config.wepKeys[0] = null; in testGetSsidAndSecurityTypeString()
411 config.wepKeys[2] = "TestWep"; in testGetSsidAndSecurityTypeString()
[all …]
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
DWifiBackupRestoreTest.java1217 if (configuration.wepKeys[0] != null) { in writeConfigurationToWpaSupplicantConf()
1218 out.write(" " + "wep_key0=" + configuration.wepKeys[0] + "\n"); in writeConfigurationToWpaSupplicantConf()
1220 if (configuration.wepKeys[1] != null) { in writeConfigurationToWpaSupplicantConf()
1221 out.write(" " + "wep_key1=" + configuration.wepKeys[1] + "\n"); in writeConfigurationToWpaSupplicantConf()
1223 if (configuration.wepKeys[2] != null) { in writeConfigurationToWpaSupplicantConf()
1224 out.write(" " + "wep_key2=" + configuration.wepKeys[2] + "\n"); in writeConfigurationToWpaSupplicantConf()
1226 if (configuration.wepKeys[3] != null) { in writeConfigurationToWpaSupplicantConf()
1227 out.write(" " + "wep_key3=" + configuration.wepKeys[3] + "\n"); in writeConfigurationToWpaSupplicantConf()
1229 if (configuration.wepKeys[0] != null || configuration.wepKeys[1] != null in writeConfigurationToWpaSupplicantConf()
1230 || configuration.wepKeys[2] != null || configuration.wepKeys[3] != null) { in writeConfigurationToWpaSupplicantConf()
DWifiConfigurationTestUtil.java386 configuration.wepKeys = TEST_WEP_KEYS; in createWepNetwork()
401 configuration.wepKeys[0] = TEST_WEP_KEYS[0]; in createWepNetworkWithSingleKey()
646 && WifiConfigurationUtil.hasAnyValidWepKey(configuration.wepKeys)) { in getScanResultCapsForNetwork()
710 assertEquals(expected.wepKeys, actual.wepKeys); in assertCommonConfigurationElementsEqual()
830 assertEquals(expected.wepKeys, actual.wepKeys); in assertConfigurationEqualForSupplicant()
DWifiConfigManagerTest.java1684 String[] wepKeys = in testMultipleUpdatesSingleNetwork() local
1688 assertAndSetNetworkWepKeysAndTxIndex(network, wepKeys, wepTxKeyIdx); in testMultipleUpdatesSingleNetwork()
1695 String[] wepKeysNew = Arrays.copyOf(wepKeys, wepKeys.length); in testMultipleUpdatesSingleNetwork()
2089 assertFalse(wepNetwork.wepKeys[0].equals("\"pswrd\"")); in testUpdateWepKeysClearsHasEverConnected()
2090 wepNetwork.wepKeys = new String[] {"\"pswrd\"", null, null, null}; in testUpdateWepKeysClearsHasEverConnected()
2163 someRandomNetworkWithAllMaskedFields.wepKeys = WifiConfigurationTestUtil.TEST_WEP_KEYS; in testUpdateIgnoresMaskedPasswords()
2180 assertEquals(someRandomNetworkWithAllMaskedFields.wepKeys, in testUpdateIgnoresMaskedPasswords()
2181 retrievedNetworkWithPassword.wepKeys); in testUpdateIgnoresMaskedPasswords()
2194 assertEquals(someRandomNetworkWithAllMaskedFields.wepKeys, in testUpdateIgnoresMaskedPasswords()
2195 retrievedNetworkWithPassword.wepKeys); in testUpdateIgnoresMaskedPasswords()
[all …]
DWifiConfigurationUtilTest.java445 config.wepKeys = new String[]{ WifiConfigurationUtil.PASSWORD_MASK, in testValidatePositiveCases_MaskedWepKeysString()
462 config.wepKeys = new String[] {"\"abcd\""}; in testValidateNegativeCases_BadWepKeysLength()
464 config.wepKeys = new String[] {"456"}; in testValidateNegativeCases_BadWepKeysLength()
467 config.wepKeys = new String[] {""}; in testValidateNegativeCases_BadWepKeysLength()
479 config.wepTxKeyIndex = config.wepKeys.length; in testValidateNegativeCases_BadWepTxKeysIndex()
/packages/modules/Wifi/framework/java/android/net/wifi/
DWifiConfiguration.java1068 public String[] wepKeys; field in WifiConfiguration
1584 if (wepKeys == null) return false; in hasWepKeys()
1585 for (int i = 0; i < wepKeys.length; i++) { in hasWepKeys()
1586 if (wepKeys[i] != null) { in hasWepKeys()
2863 wepKeys = new String[4]; in WifiConfiguration()
2864 for (int i = 0; i < wepKeys.length; i++) { in WifiConfiguration()
2865 wepKeys[i] = null; in WifiConfiguration()
3381 } else if (wepTxKeyIndex >= 0 && wepTxKeyIndex < wepKeys.length in getSsidAndSecurityTypeString()
3382 && wepKeys[wepTxKeyIndex] != null) { in getSsidAndSecurityTypeString()
3563 wepKeys = new String[4]; in WifiConfiguration()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DXmlUtil.java384 private static void writeWepKeysToXml(XmlSerializer out, String[] wepKeys) in writeWepKeysToXml() argument
386 String[] wepKeysToWrite = new String[wepKeys.length]; in writeWepKeysToXml()
388 for (int i = 0; i < wepKeys.length; i++) { in writeWepKeysToXml()
389 if (wepKeys[i] == null) { in writeWepKeysToXml()
392 wepKeysToWrite[i] = wepKeys[i]; in writeWepKeysToXml()
472 writeWepKeysToXml(out, configuration.wepKeys); in writeCommonElementsToXml()
583 private static void populateWepKeysFromXmlValue(Object value, String[] wepKeys) in populateWepKeysFromXmlValue() argument
589 if (wepKeysInData.length != wepKeys.length) { in populateWepKeysFromXmlValue()
593 for (int i = 0; i < wepKeys.length; i++) { in populateWepKeysFromXmlValue()
595 wepKeys[i] = null; in populateWepKeysFromXmlValue()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/
DWifiUtils.java107 config.wepKeys[0] = password; in getWifiConfig()
109 config.wepKeys[0] = '"' + password + '"'; in getWifiConfig()
/packages/apps/Settings/src/com/android/settings/wifi/dpp/
DWifiDppUtils.java139 .wepKeys[privilegedWifiConfiguration.wepTxKeyIndex]; in getPresharedKey()
175 return (config.wepKeys[0] == null) ? in getSecurityString()
515 return (config.wepKeys[0] != null) ? WifiEntry.SECURITY_WEP : WifiEntry.SECURITY_NONE; in getSecurityTypeFromWifiConfiguration()
DWifiNetworkConfig.java268 wifiConfiguration.wepKeys[0] = mPreSharedKey; in getWifiConfigurations()
270 wifiConfiguration.wepKeys[0] = addQuotationIfNeeded(mPreSharedKey); in getWifiConfigurations()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/security/
DWifiSecurityHelper.java125 config.wepKeys[0] = password; in getConfig()
127 config.wepKeys[0] = '"' + password + '"'; in getConfig()
/packages/apps/Car/Settings/src/com/android/car/settings/wifi/
DWifiUtil.java236 wifiConfig.wepKeys[0] = password; in finishWifiConfig()
238 wifiConfig.wepKeys[0] = '"' + password + '"'; in finishWifiConfig()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/setup/
DAddStartState.java52 && TextUtils.isEmpty(configuration.wepKeys[0])) in processForward()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/util/
DWifiSecurityUtil.java61 return (config.wepKeys[0] != null) ? AccessPoint.SECURITY_WEP : AccessPoint.SECURITY_NONE; in getSecurity()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/wifi/
DWifiConfigurationProvider.java262 wifiConf.wepKeys[0] = password; in updateForWEPConfiguration()
264 wifiConf.wepKeys[0] = '"' + password + '"'; in updateForWEPConfiguration()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/wifi/
DWifiConfigurationProviderTest.java128 assertEquals("\"" + TEST_PASSWORD + "\"", wifiConf.wepKeys[0]); in testWep()
139 assertEquals(TEST_PASSWORD_WEP, wifiConf.wepKeys[0]); in testWep2()
/packages/apps/Settings/src/com/android/settings/wifi/addappnetworks/
DAddAppNetworksFragment.java318 return (config.wepTxKeyIndex >= 0 && config.wepTxKeyIndex < config.wepKeys.length) in getWepKey()
319 ? config.wepKeys[config.wepTxKeyIndex] : null; in getWepKey()
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/
DWifiConfigController2Test.java624 assertThat(wifiConfiguration.wepKeys[0]).isEqualTo(NUMBER_AND_CHARACTER_KEY); in getWepConfig_withNumberAndCharacterKey_shouldContainTheSameKey()
635 assertThat(wifiConfiguration.wepKeys[0]).isNotEqualTo(PARTIAL_NUMBER_AND_CHARACTER_KEY); in getWepConfig_withPartialNumberAndCharacterKey_shouldContainDifferentKey()
/packages/apps/Settings/src/com/android/settings/wifi/
DWifiConfigController2.java614 config.wepKeys[0] = password; in getConfig()
616 config.wepKeys[0] = '"' + password + '"'; in getConfig()
DWifiConfigController.java634 config.wepKeys[0] = password; in getConfig()
636 config.wepKeys[0] = '"' + password + '"'; in getConfig()

12