summaryrefslogtreecommitdiffstats
path: root/tests/wifitests/src
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Wifi usability: Change the unit of the threshold for tx/rx ↵Mingguang Xu2019-10-061-4/+4
| | | | | | | | | | | | | | throughput from Mbps to Kbps" This reverts commit ec1e58cd439ae645ff4e5bf55f7961e359bf0e4c. Reason for revert: This change introduced a bug and it completely changed the functionality of WiFi data stall detection, e.g., high Tx link speed can easily trigger data stall.  We would like to roll back them to restore the normal functionality of Wifi data stall detection. Bug: 141995185 Change-Id: I0a2ca9d20771296774af0196f7d0a147d7874249 Merged-In: I76d6338cd2d482d198fde1e5a2d1a0540c087ca6 (cherry picked from commit 1bea2b5d4072cc068fbb120a9d7e9338adee74de)
* Merge "Fix a bunch of multi-user API calls" into qt-qpr1-devTreeHugger Robot2019-09-203-5/+9
|\
| * Fix a bunch of multi-user API callsRoshan Pius2019-09-203-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | To handle multi-user scenarios, pass in the corresponding app's user id to fetch app info. Bug: 140895783 Test: atest com.android.server.wifi Test: Ran presubmit ACTS tests Change-Id: I400bad75510b064ad405fae07f56671d2c211178 Merged-In: I400bad75510b064ad405fae07f56671d2c211178 (cherry-picked from a1bbebf25cb7b4e33a7b5abaa6ee6402de95ebc9)
* | Wifi usability: Change the unit of the threshold for tx/rx throughput from ↵Mingguang Xu2019-09-191-4/+4
|/ | | | | | | | | | | | | | Mbps to Kbps Data stall event can be triggered if the tx/rx tput is consecutively below a threshold over multiple RSSI polls.   Changing the unit of the threshold from Mbps to Kbps allows us to configure a value below 1Mbps, e.g., 400Kbps. Bug: 141027476 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Change-Id: If0ca391b248c4248da8d2fee37c82d74fdb25ed2 Signed-off-by: Mingguang Xu <mingguangxu@google.com> Merged-In: I76d6338cd2d482d198fde1e5a2d1a0540c087ca6
* Merge "WifiPermissionsUtil: Use getApplicationInfoAsUser for target SDK ↵Roshan Pius2019-09-183-26/+31
|\ | | | | | | checks" into qt-qpr1-dev
| * WifiPermissionsUtil: Use getApplicationInfoAsUser for target SDK checksRoshan Pius2019-09-183-26/+31
| | | | | | | | | | | | | | | | | | To handle multi-user scenarios, pass in the corresponding app's user id to fetch app info. Bug: 140895783 Test: atest com.android.server.wifi Change-Id: I0ff22e39513778b13648b226e91d8a27effc7596
* | Wifi usability: Data stall detection based on link layer statsMingguang Xu2019-09-182-54/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an effort to define new criterion for triggering Wifi data stall: (1) Defined data stall criterion based on transmit and/or receive throughput, transmit packet error rate, and CCA level. Data stall is triggered when transmit and/or receive links are consecutively bad over multiple RSSI polls. (2) Added DeviceConfig flags (that is disabled by default) which may be configured on the server side to tune the thresholds at which data stall gets triggered. Bug: 141027476 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Change-Id: I3c5d9756ff74c0b5682a0b2a51ed64c27c679d72 Signed-off-by: Mingguang Xu <mingguangxu@google.com> Merged-In: I76d6338cd2d482d198fde1e5a2d1a0540c087ca6
* | Merge "Enable WiFi HAL ring buffer in softap mode" into qt-qpr1-devSunil Ravi2019-08-292-82/+238
|\ \
| * | Enable WiFi HAL ring buffer in softap modeSunil Ravi2019-08-282-82/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.Enable wifi hal ring buffer in softap mode. 2. Handle logging in concurrency mode. Bug: 137229948 Test: Take bug report in STA mode, SoftAp mode and concurrent mode and make sure wifihal ring buffer logs are captured in bugreport. Change-Id: Ib4ecaff96ebf7c89f8e509b118d99d95c91c373c Merged-In: Ib4ecaff96ebf7c89f8e509b118d99d95c91c373c
* | | Merge "Change system language, passpoint R2 failed to connect" into qt-qpr1-devTreeHugger Robot2019-08-282-7/+87
|\ \ \ | |/ / |/| |
| * | Change system language, passpoint R2 failed to connectSteven Liu2019-08-282-7/+87
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The comparing of friendly names from AP are mismatched with subject names from OSU server certificate. it shouldn't use system default locale, the languages and names broadcasted by AP should be used. Bug: 139854572 Test: Change the device language to Chinese, connect to passpoint network; unit test. Change-Id: I7ac6dbc00c3701010d9643df46ac78a5de665876
* | Merge "WifiVendorHal: Post callback to invoke RadioModeChange callback" into ↵TreeHugger Robot2019-08-261-0/+5
|\ \ | |/ |/| | | qt-qpr1-dev
| * WifiVendorHal: Post callback to invoke RadioModeChange callbackRoshan Pius2019-08-261-0/+5
| | | | | | | | | | | | | | | | Avoid calling WifiNative callbacks directly from the Hwbinder thread. Bug: 139985227 Test: atest com.android.server.wifi.WifiVendorHalTest Change-Id: I704b7a32eef0b518173793ab43f5644be998fd75
* | [NetworkSuggestion] change notification contentNate Jiang2019-08-221-2/+2
|/ | | | | | | | | Change the notification content of first time apply network suggestion Test: acts WifiNetworkSuggestionTest Bug: 139037269 Change-Id: I1e831b5322e12f030388c7ca81a6456ec77009ed
* Merge "WifiServiceImpl: Allow setWifiEnabled for system apps" into qt-qpr1-devTreeHugger Robot2019-08-141-0/+37
|\
| * WifiServiceImpl: Allow setWifiEnabled for system appsRoshan Pius2019-08-131-0/+37
| | | | | | | | | | | | | | | | | | This allows system apps to toggle wifi on/off during emergency calls to get user's location for example. Bug: 138091278 Test: atest com.android.server.wifi Change-Id: I095f9755c60034064e467dedcdb16b33dc63d9eb
* | [NetworkSuggestion] ask user approval when first time add suggestionsNate Jiang2019-08-131-14/+134
| | | | | | | | | | | | | | | | | | | | | | | | Post a user approval notification when App first time add suggestions. If user dismissal the notification, will post notification again when suggestion matched in scan result. Bug: 139037269 Test: atest android.net.wifi Test: atest com.android.server.wifi Test: acts WifiNetworkSuggestionTest Change-Id: I72deeefb90f43af97e8574e40ebadca5e16a35f8
* | Merge "[NetworkSuggestion] add hidden network from network suggestion" into ↵Nate Jiang2019-08-103-10/+72
|\ \ | | | | | | | | | qt-qpr1-dev
| * | [NetworkSuggestion] add hidden network from network suggestionNate Jiang2019-08-093-10/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add hidden network from network suggestion to the scan list, make it can be auto connected and appear in the scan result. Bug: 138975620 Test: atest android.net.wifi Test: atest com.android.server.wifi Test: acts WifiNetworkSuggestionTest Merged-In: Ib053b7b33ed01e7da2cff888b0f720f9d6cdb528 Change-Id: Ib4bc9c51ee6e28471aee34fb7737f3659152c7d3
* | | Merge changes from topic "configstore_integrity_same_file" into qt-qpr1-devRoshan Pius2019-08-083-78/+326
|\ \ \ | | | | | | | | | | | | | | | | | | | | * changes: WifiConfigStore: Store integrity data in same file Revert "WifiConfigStore: Limit integrity checks to single user devices"
| * | | WifiConfigStore: Store integrity data in same fileRoshan Pius2019-08-072-30/+328
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store the computed integrity data back in the same config store file. The previous approach of storing the integrity data in a separate file made config store updates non-atomic (look at associated bug for details). New approach: a) Store the integrity data at the start of each config store XML file (version + integrity == metadata for each file). b) Uprev the config store version to 2 to support the new format. c) Since we need to an-in place integrity check, when we write the file For writes: i) We fill up the integrity fields with the zeroes for the expected number of bytes in the store file contents. ii) Compute the integrity for the entire file contents. iii) Rewrite the document metadata (version & integrity data) with the newly computed integrity data in store file contents. iv) Write the file contents to disk. For reads: i) Parse out the version & integrity contents from the file contents. ii) Rewrite the document metadata (version & integrity data) with zeroed integrity data in store file contents. iii) Compute the integrity data for the modified file contents created from (ii) and validate the result with the parsed value from (i). iv) If the integrity check passes, continue with the parsing of the document, else abort. d) Since we need fixed size fields in the integrity fields, remove storage of keystore alias string from |EncryptedData|. This can anyway be trivially computed from the config store file name. Bug: 138482990 Test: Verified that the device does not lose any stored networks on reboot when the config store file is not modified. Test: Verified that the device discards all stored networks on reboot when the config store file is modified. Test: atest com.android.server.wifi Test: Will send for full regression test. Change-Id: I528d3402cb047cca3793be5f1386c4bb60c39a10
| * | | Revert "WifiConfigStore: Limit integrity checks to single user devices"Roshan Pius2019-08-062-52/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8e70909c098f29b008d062e0cb30f313d300542d. Removing workaround. Proper fix in CL above. Bug: 138482990 Test: N/A Change-Id: Iaee7746a3afc0fd6e80daa77ce5034e660261e8b
* | | Merge "WifiService: Ignore wifi state change API in crypt debounce state" ↵Roshan Pius2019-08-081-1/+66
|\ \ \ | |/ / |/| | | | | into qt-qpr1-dev
| * | WifiService: Ignore wifi state change API in crypt debounce stateRoshan Pius2019-08-061-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the device is in crypt debounce state (transitioning to full disk encryption), we don't start wifi stack. Hence WifiController state machine is not initialized in this state and any public API calls from settings or other parts of the system will cause a crash. Handle this state more gracefully by explicitly failing all the state change API's in this state. Bug: 136799715 Test: atest com.android.server.wifi.WifiServiceImplTest Change-Id: I36a603c01b1421bfa5e015696902946154ea0989
* | | Merge "[Passpoint] OSU system exception when the URL is HTTP" into qt-qpr1-devTreeHugger Robot2019-08-031-8/+24
|\ \ \
| * | | [Passpoint] OSU system exception when the URL is HTTPHai Shalom2019-08-021-8/+24
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added checks that the OSU URL is a HTTPS type, and that openConnection returns an object of HTTPS type before casting it. Added additional tests. Add addtional error logs when the OSU cert fails verifications. Bug: 138444946 Test: atest OsuServerConnectionTest Test: Verify class cast exception with HTTP URL before the change and a handled error when the change is applied. Change-Id: I85b88988f056efd993e19ba157df1d3987b60b27
* | | Merge "WifiService: Allow DO/PO apps to toggle wifi" into qt-qpr1-devTreeHugger Robot2019-08-031-0/+40
|\ \ \ | |/ / |/| |
| * | WifiService: Allow DO/PO apps to toggle wifiRoshan Pius2019-07-291-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | Allow DO/PO apps to toggle wifi even if they target Q SDK. Bug: 136487810 Test: atest com.android.server.wifi.WifiServiceImplTest Change-Id: If59dd4485a6265077f50800c0089a0dd9d61c2f0
* | | WifiConfigStore: Limit integrity checks to single user devicesRoshan Pius2019-08-012-2/+52
|\ \ \ | |/ / |/| | | | | | | | | | | am: 8e70909c09 Change-Id: I3e29479001db5b537126e89ccddf3c0f3bfbcac4
| * | WifiConfigStore: Limit integrity checks to single user devicesRoshan Pius2019-08-012-2/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 138482990 Test: atest com.android.server.wifi Test: Device boots up & verified that config store files are not integrity protected. Test: Will send for full wifi regression tests. Change-Id: I1bf8ae320935cc1bf70625792c4c1a5e0d54f034 (cherry-picked from 3d3f64e670c5a2e3469fd9577b0e635447cbe70d)
* | | Merge "[WifiNetworkFactory] Trim user approval list per App" into qt-qpr1-devTreeHugger Robot2019-07-261-0/+161
|\ \ \ | |/ / |/| |
| * | [WifiNetworkFactory] Trim user approval list per AppNate Jiang2019-07-251-0/+161
| |/ | | | | | | | | | | | | | | | | | | Add capacity limit of APs for each App, remove least recently used ones when capacity is exceeded. Bug: 137129535 Test: atest android.net.wifi Test: atest com.android.server.wifi Change-Id: I5c1b7fa9c6ccc35e63f96c49e645bdb4ee7a5b77
* | Merge "Wifi: add per-band Tx and Rx speed histogram in WifiMetrics and add ↵Kai Shi2019-07-251-0/+55
|\ \ | |/ |/| | | rxLinkSpeed in logLinkMetrics() of WifiScoreReport" into qt-r1-dev
| * Wifi: add per-band Tx and Rx speed histogram in WifiMetrics and addKai Shi2019-07-221-0/+55
| | | | | | | | | | | | | | | | | | rxLinkSpeed in logLinkMetrics() of WifiScoreReport Bug: 137886569 Test: unit test with frameworks/opt/net/wifi/tests/wifitests/runtest.sh and manual test Change-Id: Id57ad91e84cd68de558b21d568037bfc5a250966
* | [NetworkSuggestion] remove all suggestion should trigger disconnectNate Jiang2019-07-161-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | When App with "NETWORK_CARRIER_PROVISIONING" permission removes all suggestions, framework should disconnect connected network if suggested by this APP. Bug: 137597179 Test: atest android.net.wifi Test: atest com.android.server.wifi Test: acts WifiNetworkSuggestionTest Change-Id: I2e1193cdc6013028788b447e4da05d61cfa16e6d
* | Merge "Mask out macRandomizationSetting when feature is unsupported" into ↵TreeHugger Robot2019-07-111-0/+39
|\ \ | | | | | | | | | qt-r1-dev
| * | Mask out macRandomizationSetting when feature is unsupportedxshu2019-07-101-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All wifi networks will use factory MAC to connect when the config_wifi_connected_mac_randomization_supported feature flag is set to false. Making macRandomizationSetting always return "false" in the above case. Bug: 137230966 Test: unit tests Test: manual test on a unsupported device - verifying network details page is always showing the factory MAC address. Change-Id: I3ed8599a7123a084bdf20d8f30ba6dcbcea83356
* | | WifiNetworkSuggestionsManager: Persist user approval immediatelyRoshan Pius2019-07-031-0/+8
|\ \ \ | |_|/ |/| | | | | | | | | | | am: 7abed5d4cf Change-Id: I54c3c9e22353d89f4f0d3dbc956ddca302ef13f5
| * | WifiNetworkSuggestionsManager: Persist user approval immediatelyRoshan Pius2019-07-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User approval decisions are not currently triggering a disk persistence. If the app does not modify any of it's suggestions, then this approval bit may not get persisted. Bug: 136565650 Test: atest com.android.server.wifi Test: NetworkSuggestion ACTS test Change-Id: I8796132fa3cc6356b9f4d43c9d3ffcdd72f7c89a
| * | Merge "WifiNetworkSuggestionsManager: Persist enterprise credentials" into ↵Roshan Pius2019-06-281-4/+21
| |\ \ | | | | | | | | | | | | qt-dev
| | * | WifiNetworkSuggestionsManager: Persist enterprise credentialsRoshan Pius2019-06-271-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enterprise credentials for suggestions were not being persisted to disk. This would prevent the device from auto-connecting to networks suggested by apps (via the new network suggestion API surface) after a reboot. Bug: 136088495 Test: atest com.android.server.wifi Test: ACTS test: NetworkSuggestionTest Test: Verified scenario mentioned in the bug (carrier wifi app suggested EAP networks not connecting). Merged-In: Ife2cff3daf84a5986cb2b63207eccf1b6faee5ae Change-Id: Ife2cff3daf84a5986cb2b63207eccf1b6faee5ae
* | | | Merge "Detect+trigger bugreport for abnormal connections" into qt-r1-devOscar Shu2019-06-281-2/+104
|\ \ \ \
| * | | | Detect+trigger bugreport for abnormal connectionsxshu2019-06-271-2/+104
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an effort investigate why certain connections take really long to finish. Users running user-debug builds will be shown an notification, which they may tap on to file a bugreport. Added DeviceConfig flags (that is disabled by default) which may be configured on the server side to enable this feature for a select group of users. Also added a flag to fine tune the threshold at which bugreports get triggered. Bug: 132648941 Test: Unit tests Test: Tested turning on the bugreport trigger with "adb shell device_config put wifi abnormal_connection_bugreport_enabled true" Test: Ran "adb shell device_config put wifi abnormal_connection_duration_ms 30" and verified that bugreport is taken Change-Id: Ic4ea7c1850677781838a645b989f81db858546f4
* | | | WifiNetworkSuggestionsManager: Persist enterprise credentialsRoshan Pius2019-06-271-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enterprise credentials for suggestions were not being persisted to disk. This would prevent the device from auto-connecting to networks suggested by apps (via the new network suggestion API surface) after a reboot. Bug: 136088495 Test: atest com.android.server.wifi Test: ACTS test: NetworkSuggestionTest Test: Verified scenario mentioned in the bug (carrier wifi app suggested EAP networks not connecting). Change-Id: Ife2cff3daf84a5986cb2b63207eccf1b6faee5ae
* | | | opt/net/wifi/util: add WPA2 symbolNate Jiang2019-06-251-3/+3
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | am: b55924f05b Change-Id: I015727714bb4bc152a0ec9173002495779e3ac05
| * / opt/net/wifi/util: add WPA2 symbolNate Jiang2019-06-251-3/+3
| |/ | | | | | | | | | | | | | | | | | | | | For apps compatibility, add "WPA2" for WPA2 network, in the same time keep "RSN" for WPA2 and WPA3 network. Test: atest android.net.wifi Test: atest com.android.server.wifi Test: ACTS WifiNetworkRequestTest to print out scan result Bug: 135733338 Change-Id: I133b52b9b0d7b94680394b4b0e22f4eb77b9ee25
* | Merge "Revert "Trigger bugreport for abnormally long connections"" into ↵Xin Li2019-06-221-113/+2
|\ \ | | | | | | | | | qt-r1-dev
| * | Revert "Trigger bugreport for abnormally long connections"Oscar Shu2019-06-211-113/+2
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fae988bc1a3ff26b83e8d52a4893364ccd9898d5. Reason for revert: This CL has a vendor dependency, which would cause breakages on builds that don't have vendor partitions. Will revert first and then submit alternative CL which don't have vendor dependency. Change-Id: I5ba7f59274daad09691af1ad8949ebab3a382b6b
* | | Merge "Trigger bugreport for abnormally long connections" into qt-r1-devOscar Shu2019-06-201-2/+113
|\| |
| * | Trigger bugreport for abnormally long connectionsxshu2019-06-191-2/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an effort investigate why certain connections take really long to finish. Users running user-debug builds will be shown an notification, which they may tap on to file a bugreport. Added GService flags (that is disabled by default) which may be configured on the server side to enable this feature for a select group of users. Also added a flag to fine tune the threshold at which bugreports get triggered. Bug: 132648941 Test: Unit tests Test: mannually tested with a smaller threshold to verify bugreport is triggering properly. Test: Tested setting Gservices value with adb command "am broadcast -a com.google.gservices.intent.action.GSERVICES_OVERRIDE -e android.wifi.abnormal_connection_duration_ms 300" Change-Id: I2f5f9c9c08874f6f356a081b0a2575dd3851c241