summaryrefslogtreecommitdiffstats
path: root/tests/wifitests/src/com/android/server/wifi/WifiCountryCodeTest.java
Commit message (Collapse)AuthorAgeFilesLines
* Fix case for not reverting country code on cellular lossNingyuan Wang2017-09-121-1/+26
| | | | | | | | | | | | | This CL allows us to keep using last known country code on cellular loss and |mRevertCountryCodeOnCellularLoss| is set to false. This also fixes simCardRemoved() to revert country code unconditionally, and cleans up code for airplaneModeEnabled(). Bug: 65602314 Test: compile, unit tests Change-Id: I7b15d9ae197c5e2aacd7788b505e386f970786ed
* Reset to default country code when phone is out of serviceNingyuan Wang2017-03-181-0/+17
| | | | | | Bug: 36229469 Test: compile, unit tests, manual test Change-Id: Ic6689cee5f559158cee16c3bf3072e96496f19c6
* Stop supporting persistent country codeNingyuan Wang2017-03-151-28/+5
| | | | | | | | | This actually reverts ag/1108739/, which we don't need anymore. Bug: 29353903 Test: compile, unit tests Change-Id: Ic0e52f0832d0b78a3b6f7e24694e2b0427866d75
* Fix tethering failure when wifi is not startedNingyuan Wang2016-07-221-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | getCurrentCountryCode() returns the country code which we already sent to driver. However, sometimes when wifi and location scan are not started, we have a valid country code but we didn't set it. In this case getCurrentCountryCode() returns null. This will confuse SoftApManager and break tethering. This also causes WifiApDialog not to show 5GHz option in the UI when user creates a new wifi hotspot config. In this CL we fix the incorrectly reported country code by adding a function getCountryCode() which returns a valid country code regardless of was it sent to driver or not. SoftApManager and WifiApDialog will use this function to make decisions. In addition, we also rename getCurrentCountryCode() to getCountryCode SentToDriver() for better readability. BUG=30200338 TEST=compile TEST=unit tests TEST=manual tests Change-Id: I5ba576509f9f401f4d57a4628a147ac8871552c0
* Continue supporting persisting country codeNingyuan Wang2016-06-061-6/+31
| | | | | | | | | | | | | Some devices rely on Setup Wizard to set a persistent country code. This CL honors the persistent option, fixing corresponding 5GHz AP problem. This also includes addtional unit tests for this change. BUG=28127280 TEST=compile TEST=runtest frameworks-wifi Change-Id: I2f36216e143d0ac4959f26a9965def061a06aabf
* Wifi country code refactoringNingyuan Wang2016-03-161-0/+168
This CL pulls coutry code logic into one class. This also refactors all the existing country code logic. We do not set country code for P2p interface now because this is redundant. wpa_supplicant will route all the request to the real interface. Some initial unittests are added. Bug: 27477896 TEST: compile, runtest frameworks-wifi, manually tested with an angler phone Change-Id: I870c3ad615a1f9bfb3fb40b149b9ca71dc850cdd