Commit Graph

38 Commits

Author SHA1 Message Date
TreeHugger Robot
edd587c2a6 Merge "[Wi-Fi] Support multi-SIM for SIM dependent EAP methods" into rvc-qpr-dev 2020-08-07 11:37:27 +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
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
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
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
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
Steven Liu
2bd1d93555 Remove those stuff about CarrierAp, they are removed from FW.
Bug: 130875004
Test: atest SettingsRoboTests
Change-Id: I549eabd1699a617dd6e639b725ade361c64d5a67
2019-12-12 10:38:38 -08:00
Arc Wang
41661fe69c [Wi-Fi] Force users to select a phase2 authentication for PEAP & TTLS
To improve security.

Bug: 143601727
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigControllerTest
Change-Id: I0cb1ceda6d89a52224f80ea5ffd1af709a6acace
2019-11-20 10:59:23 +08:00
govenliu
116060e011 [Wi-Fi] [a11y] The "Advanced options" should be accessible by Voice Access and pronounced by talkback correctly.
The checkbox is unclickable via Accessibility.

Solution: Refine the solution of b/30079196 to let checkbox be focusable and clickable by Accessibility, and remove unnecessary Accessibility pronunciation strings.

Bug: 141588638
Bug: 141588161
Test: Add unit test to check the content description of the checkbox.
Change-Id: I2e7932f64ae29a13b793276eab6705009af20104
2019-10-17 17:10:17 +08:00
govenliu
712df89893 [Wi-Fi] Cannot connect to hidden WiFi network.
When click "Add network" to add a new network, user may ignore the "Hidden network" item, which is in "Advanced options". That will cause the added hidden network can not be connected.

To improve it, move the "Hidden network" from last one to be first one.

Bug: 135281908
Test: Check if the hidden setting spinner is the first one item in Advanced options.
Change-Id: I0f90a6b2992b38ccae461c07d6b13cda0ca9d2b2
2019-09-18 16:56:22 +08:00
Arc Wang
9db4bf7dbb [Wi-Fi] Can't change EAP method for a saved enterprise Wi-Fi network
Should only allow saved network UI initialization for once.

Bug: 140362368
Test: WifiConfigControllerTest
      manual:
      Manually change EAP method and other security fields for a saved
      Wi-Fi neterprise network.

Change-Id: Iddc1dae53849760f43b41b75262358dff6ba09af
2019-09-05 16:07:08 +08:00
govenliu
c3eab6a9d9 [Wi-Fi] Hide SoftKeyboard temporary when user tap the advanced button.
When tapping on the advanced button during configuring a network, some items in the expanded list are covered by IME keyboard, which may cause user to ignore them accidently.

To improve it, hide the IME temporary to let user can see most of them.

Bug: 78441374
Test: Use ShadowInputMethodManager to check if the keyboard is hide or not after tapping on the advance button.
Change-Id: I0677d96febc90c66d1cf6f98555bbb436a654660
2019-08-20 10:55:44 +08:00
Arc Wang
6351f7c37a [Wi-Fi] Remove unsupported EAP methods for WPA3-Enterprise 192-bit - I
1. Only support EAP-TLS for WPA3-Enterprise 192-bit
2. Remove "Do not validate" from the CA certificate menu
3. Remove "Do not provide" from user certificate menu

To reduce review effort, I left refine code change in another CL.

Bug: 135127581
Test: WifiConfigControllerTest
Change-Id: Ibf904da9407ec803afb8bb995e9df1a2e25f0dcb
2019-07-25 14:27:41 +08:00
govenliu
41cdecca3d [Wi-Fi] EAP method AKA' did not pronounced as AKA prime.
Spinner did not use ttsspan to store the display string so AKA' just
pronounced as AKA.

To fix it, use charsequence array, which each specific array item have
the ttsSpan to store the string for TTS engine.

Bug: 119929832
Test: Set a 3-texts array and check if the specific array item
replacement mechanism work correctly or not.

Change-Id: I8e7d10da99a3f3503e1019687c45cf40070d0045
2019-07-11 09:31:15 +08:00
Hai Shalom
9d8d090c08 [OWE] Rename isOweSupported to isEnhancedOpenSupported
Stick to the official WFA marketing name in this public API.

Bug: 125850601
Test: atest com.android.server.wifi
Test: Use Settings to scan and connect to OWE network
Test: atest WifiConfigControllerTest
Change-Id: I1360658e805b10db65f66f1194e342b063b741a4
2019-02-28 19:27:35 -08:00
cosmohsieh
b521bd6225 [Mac Randomization] Change order of Privacy setting in "Add network"
page

For better UX, making the default option 'Use randomized MAC (default)' as the
first option item in "add network" page.

Bug: 123160090
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: Ifdba5a323df21c8d3442f394acdebd1c3f259c69
2019-01-25 12:05:18 +08:00
James Lemieux
f1dade40d2 Use binary resource support in robolectric
The resources available to tests are now exactly the merged resources
located in the APK under test.

Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
2018-12-12 19:53:49 -08:00
Hai Shalom
1638168336 [WPA3] Filter unsupported networks from Add network spinner
Filter unsupported networks from Add network spinner. Removed entries
from wifi_dialog.xml, adding them dynamically based on device
capabilities. Adding position-to-security table, that decouples spinner
positions from security values.

Bug: 112195778
Test: atest WifiConfigControllerTest + device functional test
Change-Id: I6a814c4d69fbd8d8076db5dbaa5da807b4da4c32
2018-11-21 18:58:38 -08:00
jackqdyulei
e95f07dff6 Still check the visibility of view
Since EAP has many sub type, which controls differnet view. We still need to check the
visibility to determine which type it is.

Bug: 116767176
Test: RunSettingsRoboTests
Change-Id: Iee04a50140ae1afacdf77eedf7743a465bae1f58
2018-09-27 16:37:48 -07:00
jackqdyulei
0c6f8065c2 Fix bug in Add network fragment
After we switch secutiry from EAP to WPA, add button will become
disabled forever. Main reason is that we use view visibility to decide
which security type it is. In this case target view is visible while its
parent view is gone. So even though UI shows correctly however we still
think it is in EAP mode.

This CL check the mAccessPointSecurity directly instead of depending on
fragile view.

Fixes: 114689178
Test: RunSettingsRoboTests

Change-Id: I4284d25e6bf86ee7c5e7c0e17f0834c719d8d587
2018-09-14 11:10:31 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Daichi Ueura
9555afb64e Hide entire hidden field for non-hidden networks
This CL hides not just hidden network spinner but entire
hidden field when a user is adding a network from scanned
network list.

Test: robotests
Bug: 80114851
Change-Id: I8b29fd764d62af1e46beaa7d26fae97848f4efe6
2018-05-23 09:18:07 -07:00
Salvador Martinez
d86cbe36b0 Hide hidden network spinner for non-hidden networks
We only want to show this when a user is manually adding a
network. This CL hides it when the user is adding a network
from the detected wifi list.

Test: robotests
Bug: 78436456
Change-Id: I81d738267d4cb21d6b7722ec619faaf8ef1fc965
2018-05-07 14:46:56 -07:00
Salvador Martinez
35b76437e0 Disable hidden network spinner on existing networks
We only want this to be modifiable if you are adding a network
manually, so this CL disables it for existing networks. You
can still see what the spinner is set to though.

Test: robotests
Bug: 78436456
Change-Id: If660e432eca2dabf5bd16881368657ee89fe5a57
2018-04-23 10:50:22 -07:00
Salvador Martinez
8bc3fa0649 Update add network dialog to not make networks hidden by default
This CL updates the add network dialog to use the provided value
for the hidden state (from androids perspective) of the network. The
default selected value will always be not hidden and if the user
selects to mark it as hidden a warning will appear to inform the
user of the privacy implications.

Test: Robotests
Bug: 29003359
Change-Id: Ifd4511e4d0af6eb01f4e951c22a91fc560393e8d
2018-03-29 23:01:24 -07:00
Yuchen Chang
1bf069f839 Request focus in wifi screen in add network and secure wifi
Request focus from parent view in controller. Based on framework
patch, it can be placed in a parent and focus will go to whatever view
is the default focusable in that hierarchy.

Fixes: 68776177
Fixes: 72882629
Test: RunSettingsRobotests and Manual test
Change-Id: I3bcdc4ec814f68079a00e40435f46bdfa53f4425
2018-03-14 17:18:39 +08:00
Ecco Park
bffd531aa3 Fix the system crash issue when secondary user clicks any 802.1x AP on
Wifi Picker.

Catch the exception when keystore failed to list the certs

Bug: 73794111
Test: test it with clicking the Google-A on Wifi Picker.
Test: make ROBOTEST_FILTER="(WifiConfigControllerTest)"
RunSettingsRoboTests -j32
RunSettingsRoboTests: OK (12 tests)

Change-Id: I0db66730261c72ef35d1b299bacd2aed7710d247
2018-03-13 16:49:08 -07:00
James Lemieux
22a39c2b93 Use external/robolectric-shadows/run_robotests.mk
This allows Settings to test against the latest framework changes.

Also replaced TestConfig with traditional robolectric.properties.

Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
2018-03-04 03:50:08 -08:00
Yuchen Chang
a253de1906 Revert "[Settings] Add focus for SSIDtext to show IME"
This reverts commit c6233057ca.

Reason for revert: cause side effect for other cursor focus missing

Change-Id: I9c788a2726bdd6bc7c663e9115bbc24538f871de

Bug: 73702700
Bug: 72882629
2018-02-23 04:01:07 +00:00
Yuchen Chang
c6233057ca [Settings] Add focus for SSIDtext to show IME
Add focus to SSIDtext to show IME when choosing add network.

Bug: 72882629
Test: RunSettingsRobotests & Manual test
Change-Id: I1c51c4b800a7668c6760c88b97e920cf75c26b26
2018-02-14 14:07:25 +08:00
jeffreyhuang
cbfb099a40 Rename SDK_VERSION_O to SDK_VERSION
Test: make RunSettingsRoboTests -j40
Change-Id: I6715062d8addadda441e32809db1af55f15e3a90
2017-12-05 16:43:54 -08:00
jeffreyhuang
71cf59e62f Move wifi test package to sdk 26
Test: make RunSettingsRoboTests -j40
Change-Id: I9ef0979a7c6c3647cedd48a2c6ab855928c1b57e
2017-12-04 16:18:55 -08:00
Glen Kuhne
ddf705903e Allow 64 char HEX string PSKs in WifiSettingsUi
A check for valid PSKs in the settings UI didnt capture the 64 character
HEX string case. Added a check for it.

Test: tests/app/src/com/android/settings/wifi/WifiSettingsUiTest.java
Test: manual verification
Bug: 67492639
Change-Id: Ide738c4a67f23b613883b4a69f8264a0ffb8a0bc
2017-10-10 13:12:21 -07:00
pkanwar
0ce5e17792 Add support for carrier wifi in UI.
Make changes to the UI, so that it does not ask for additional
information while connecting to Carrier Wifi. Also, indicate in wifi
picker if the wifi is a carrier network.

Bug:30988281
Test: make RunSettingsRoboTests -j40 ROBOTEST_FILTER=WifiConfigControllerTest
Test: manual
Change-Id: Iecbcd77d400264aaaa16a6a95a2093d58f2748f9
2017-08-02 15:29:39 -07:00
Andrew Sapperstein
9f1e911759 Refactor test runner to use static list of resource paths
Previously everything lived in an inner class method of
SettingsRobolectricTestRunner. That method has now been turned into
a static method so that it can be called by other runners.

Bug: 62460102
Test: robotests
Change-Id: I6612b1f26404587301c534c8ba60e39d59d6c840
2017-06-09 09:21:26 -07:00
Fan Zhang
cc07043497 Ensure wifi ssid cannot exceed 32 bytes.
Change-Id: I5c2c50ca8599f6843da47c01b9a0447e2c85d763
Fix: 36898746
Test: make RunSettingsRoboTests
2017-06-05 16:21:09 -07:00
Shinji Sogo
8b23c35954 Show security info in saved network list
When an access point linked to a saved network is not found,
security info should be shown in dialog of saved network.
Notes that in Android N this list is created with saved networks
and scan result, and that causes security info is not shown for
access points seen around user, but in Android O only saved
networks are used to create a list. That means security info is
shown for all access points listed in the screen.

Bug: 38102896
Test: make RunSettingsRoboTests

Change-Id: Ia0c5184ae7a1325f2628f4c08e29350c5793a08f
(cherry-pick of a8382c11f58ecbfbc5b8d908b97c53d59cf774fe)
2017-05-12 10:35:08 -07:00
Glen Kuhne
3c5bd235f3 Fix null pointer exception in wifi settings
Fixes a null pointer exception that can occur during setup wizard.

Bug: 37873425
Test: make RunSettingsRoboTests -j40 ROBOTEST_FILTER=WifiConfigControllerTest
Change-Id: I40de883fae6ccde13ad264f9b8b2d9da9745eb24
2017-05-03 15:53:16 -07:00