Commit Graph

77 Commits

Author SHA1 Message Date
Arc Wang
33cde5dbee [Wi-Fi] Remove 'Do not validate' option in CA certificate spinner
"Do not validate" is not secure and must not be used in any production
network. R Suggestions API already does not allow connections with
no Root CA certificate.

Bug: 162466484
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test
      Manually add or edit  an EAP method Wi-Fi network and observe CA
      certificate spinner options.
Change-Id: Ica5ecf8805c51d7cdce7b16e02e0dd79d5f64754
Merged-In: Icf97199967faa2e359b0120a8c989bd1df2c6cea
2020-07-31 10:28:11 +08:00
Arc Wang
8734b131fb Merge "[Wi-Fi] Check if domain field is not empty when users choose a ca certificate" 2020-07-31 02:22:02 +00:00
Arc Wang
94b8579607 [Wi-Fi] Check if domain field is not empty when users choose a ca certificate
Domain is required for client to validate server's certificate.
This change disable Save button for a new Wi-Fi network of a
specified CA certificate but empty domain.

Bug: 161378819
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test
      manual
      1. Install a certificate.
      2. Add a new Wi-Fi network of EAP method PEAP
      3. Set CA certificate to the certificate installed at 1.
      4. Save button should be disabled.
      5. Input something in domain field.
      6. Save button should be enabled.
Change-Id: I65c8b29ec7a03b21403ddbfc087ce48c2a4a69e4
2020-07-31 10:06:48 +08:00
Arc Wang
21faffa23c [Wi-Fi] Remove 'Do not validate' option in CA certificate spinner
"Do not validate" is not secure and must not be used in any production
network. R Suggestions API already does not allow connections with
no Root CA certificate.

Bug: 162466484
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test
      Manually add or edit  an EAP method Wi-Fi network and observe CA
      certificate spinner options.
Change-Id: Icf97199967faa2e359b0120a8c989bd1df2c6cea
2020-07-31 09:58:20 +08:00
Arc Wang
8d5c8c2611 [Wi-Fi] Check if domain field is not empty when users choose a ca certificate
Domain is required for client to validate server's certificate.
This change disable Save button for a new Wi-Fi network of a
specified CA certificate but empty domain.

Bug: 161378819
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test
      manual
      1. Install a certificate.
      2. Add a new Wi-Fi network of EAP method PEAP
      3. Set CA certificate to the certificate installed at 1.
      4. Save button should be disabled.
      5. Input something in domain field.
      6. Save button should be enabled.
Change-Id: I65c8b29ec7a03b21403ddbfc087ce48c2a4a69e4
2020-07-29 15:13:28 +08:00
Arc Wang
2df3a3e7df [Wi-Fi] Support multi-SIM for SIM dependent EAP methods
Before this change, users are not able to choose SIM
card for SIM dependent EAP methods when a device supports
multi-SIM.

This change support to choose a SIM when adding an EAP
Wi-Fi network. And this change support to show the related
SIM information on Wi-Fi detail screen.

Bug: 142792009
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.WifiConfigControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.WifiConfigController2Test
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.details2.WifiDetailPreferenceController2Test
      Manually add an EAP Wi-Fi network of EAP-SIM type, observe the
      value in Wi-Fi detail screen.
Change-Id: I2910931166dc6541897663857c46abcc1b3115fa
2020-07-28 10:02:16 +08:00
Arc Wang
e410325b37 [Wi-Fi] Support multi-SIM for SIM dependent EAP methods
Before this change, users are not able to choose SIM
card for SIM dependent EAP methods when a device supports
multi-SIM.

This change support to choose a SIM when adding an EAP
Wi-Fi network. And this change support to show the related
SIM information on Wi-Fi detail screen.

Bug: 142792009
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.WifiConfigController2Test
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.details2.WifiDetailPreferenceController2Test
      Manually add an EAP Wi-Fi network of EAP-SIM type, observe the
      value in Wi-Fi detail screen.
Change-Id: I2910931166dc6541897663857c46abcc1b3115fa
2020-07-28 09:50:58 +08:00
Arc Wang
166ece8f1d [Wi-Fi] Remove WifiTrackerLib/AccessPoint constant & API usage
Bug: 152571756
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.dpp
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.details
Change-Id: I857cf0e261c1b07c3d7b6bc08632880ed8c71ee1
2020-07-22 07:53:52 +00:00
Arc Wang
fef7216ef9 [Wi-Fi] Remove the files which use SettingsLib Wi-Fi objects
This change removes

AddDevicePreferenceController
WifiDetailPreferenceController
WifiMeteredPreferenceController
WifiNetworkDetailsFragment
WifiPrivacyPreferenceController

Bug: 152571756
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: Id4901d632f7f4634461ebbbc096e36d348a33365
2020-07-22 07:53:33 +00:00
govenliu
dfdcdf1330 [Wi-Fi] Request focus on input field when config a WiFi network
For better user experience, recover the dialog focus command to get password field focused.

Bug: 158393164
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test
Change-Id: I343a7b43bd1ad2478991051b0bd8ef6082f75dc1
2020-06-10 07:20:40 +00:00
Arc Wang
57ff6599e7 Merge "[Wi-Fi] Fix Hidden network option scrolls to bottom problem" into rvc-dev 2020-04-10 07:50:49 +00:00
Arc Wang
d004dfc4b3 [Wi-Fi] Fix Hidden network option scrolls to bottom problem
Should not scroll to bottom since Hidden network option
is not at the bottom most.

Bug: 148036155
Test: manual
      Wi-Fi Setings -> Add network -> Advanced options ->
      click 'Hidden network' Yes -> should not scroll to bottom.
Change-Id: I6511f75441ebad62e2c28df76a39d702d78898a6
2020-04-10 13:19:30 +08:00
Arc Wang
98c17ee49f [A11Y][Wi-Fi] Fix multiple Spinner selected speak out at once.
When users select edit a Wi-Fi and select enterprise security,
there are multiple spinner shows with a default value.
This change does not allow TalkBack to speak out for multiple
Spinner text at one user selection.

Bug: 153272108
Test: manual
      Wi-Fi Settings -> Add network -> Security spinner
      -> WPA/WPA2/WPA3-Enterprise
      TalkBack should only speak out for the Security spinner.
Change-Id: Id9ab44e4da6d7abb5168e0ab7441ee1e226f5f68
2020-04-09 15:22:26 +08:00
Hai Shalom
5bb13ebefe [Settings] Use WifiConfiguration#setSecurityParams
Use WifiConfiguration#setSecurityParams instead of manually
initializing security params.

Bug: 150889755
Test: Created new connections and manually connected to open, WPA2,
WPA3, EAP and SUITE-B networks.

Change-Id: I42f4c21a37428ee87be14f6ba09dc54fa327054a
2020-03-09 22:25:56 +00:00
Arc Wang
9730b5aa86 [Wi-Fi] Ignore incorrect user certificates
These incorrect user certificates displayed when users
editing a Wi-Fi network of WPA3-Enterprise in 192bit.

Bug: 149763958
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigControllerTest2

Change-Id: Iab35ac975933abc54fda83b99a2109d53d6722d4
2020-02-24 15:23:56 +08:00
David Su
8de938499e Merge "Rename requirePMF to requirePmf" 2020-02-14 18:27:15 +00:00
David Su
59ab4ce478 Settings: remove usage of WifiConfig helper methods
These methods can be replaced with methods on
IpConfiguration itself. There is no need to expose
these as a @SystemApi, and they are being removed.

Bug: 146046526
Test: make RunSettingsRoboTests -j40
Change-Id: I592f277f5e23bf58e76b8c48a0f0370d53cc6b81
2020-01-30 10:53:48 -08:00
David Su
930a4ec30e Rename requirePMF to requirePmf
Rename to conform to API guidelines.

Bug: 146046526
Test: compiles
Change-Id: Ib888ca3fc14cf30c9217b1f573c2279627c65a22
2020-01-27 17:47:15 -08:00
Quang Luong
f21a9b0b11 Merge "Remove WifiEntry transitional security types" 2020-01-23 19:49:43 +00:00
Arc Wang
33c6e65371 [Wi-Fi] Replace WifiEntryShell#getSecurityString with WifiEntry#getSecurityString
Bug: 143326832
Bug: 146407136
Bug: 147781156
Test: manual
      Check if security information correct

Change-Id: I32c247763783a38fed14eb06de863d9819cd6bdd
2020-01-17 17:12:05 +08:00
Quang Luong
73c168162b Remove WifiEntry transitional security types
WifiEntry should only supply one security type through getSecurity(),
and transitional types should be converted to the security type that
will be used for connection.

Test: build
Bug: 70983952
Change-Id: I977f6b955b7794124e9b90ad4655cd2a2a30cb6e
2020-01-14 17:08:45 -08:00
Arc Wang
a6ec144392 [Wi-Fi] Revert "support SAE password identifier in wifi dialog"
Revert it because SPEC is not clear now.

Bug: 143379656
Test: manual
      Click "Add network" in wi-Fi picker and edit a WAP3-personal Wi-Fi network

Change-Id: Ifa859d53c29d0fa83f22cc2d0e50294d0a5c7fc9
2020-01-10 11:53:12 +08:00
Arc Wang
08b4204643 [Wi-Fi] Replace some WifiEntryShell methods with WifiEntry version
These WifiEntryShell methods are removed:

getNetworkId
hiddenSSID
isPasspoint

Bug: 143326832
Test: build
Change-Id: I6642992a90ea18328817cb58931cc370045b1e56
2020-01-02 18:11:32 +08:00
Arc Wang
808070ccbb [Wi-Fi] Show link speed for WifiDialog2 MODE_VIEW
Now there is no WifiDialog2 MODE_VIEW use case since
they are replaced by WifiNetworkDetailsFragment2.

Should think about removing MODE_VIEW in the future,
however, we should let it work before phase out it.

Bug: 146407136
Test: build
Change-Id: I7cd470c74cea846046975b8c65fd2604702cc136
2019-12-31 14:54:31 +08:00
govenliu
91d6dfc455 [Wi-Fi] Hide the Advanced Option after expanding the advanced option fields.
To align with other advanced option behaviors in other Settings items, hide the Advanced Option button after the hidden advanced options are show, which also solve the a11y issue.

Bug: 146908469
Test: Add test case getVisibility_whenAdvancedOptionClicked_shouldBeGone
to verify View is Gone.
Change-Id: I11b2f9b250a7d50d32b8c05207498f4cf14feb41
2019-12-30 12:48:29 +08:00
Arc Wang
b33190c017 [Wi-Fi] Replace AccessPoint with WifiEntry for WifiDialog2
Bug: 146407136
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.detail2

Change-Id: I65899b24c186e1bd1bb0d00db52c67264f30f3cb
2019-12-26 14:45:38 +08:00
Arc Wang
f990dfa11e [Wi-Fi] Branch WifiDialog files for WifiTracker2 development
Add these files:

  WifiConfigController2.java
  WifiConfigUiBase2.java
  WifiDialog2.java

  WifiConfigController2Test.java
  WifiDialog2Test.java

Bug: 146407136
Test: compile
Change-Id: I0689ae8ddee4f35e3bc104fd0b2e94eb8f689630
2019-12-26 14:45:28 +08:00