Commit Graph

210 Commits

Author SHA1 Message Date
Roshan Pius
f13145b323 Settings: Use public API for mac randomization support
Also, don't directly reference the default tether ssid overlay. This info
should always be retrieved from wifiManager.
This ensures that we don't use wifi overlays in settings.

Bug: 143464763
Test: atest com.android.server.wifi
Change-Id: I893a4ca0f4243e1eb6f9c8bef810d0b4a493fb88
2019-11-06 07:58:19 -08:00
Aaron Huang
9fd9700a8a Merge "Replace getNetworkPrefixLength() with public API" am: f67076dad5 am: 7b82097220 am: 5b182f20cb
am: 9c39357454

Change-Id: Id0f3c816bb95d891cfb9f0109c0afedb7494f222
2019-10-24 22:55:54 -07:00
Aaron Huang
9c39357454 Merge "Replace getNetworkPrefixLength() with public API" am: f67076dad5 am: 7b82097220
am: 5b182f20cb

Change-Id: Ib6f188586b486fa5af0a8df57a65db654f66e311
2019-10-24 22:49:20 -07:00
Aaron Huang
9251280615 Replace getNetworkPrefixLength() with public API
Use public API getPrefixLength() instead

Test: build pass

Change-Id: Ib85aa12dc22ac5b03c9bb7101beaf340014eb4fd
2019-10-24 10:51:53 +00: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
Arc Wang
44fa9d579d [Wi-Fi] Improve UX when there is no user certificate to choose for WPA-Enterprise 192-bit
Show error message when a user does not specify a user certificate
for WPA3-Enterprise 192-bit.

Bug: 138417816
Test: visual
Change-Id: Ifc519d484dbf78dad37ad7047e8b9bb40685d54c
2019-09-23 09:39:20 +08:00
Arc Wang
30c1767c0a [Wi-Fi] Fix robolectric test broken
1. WifiConfigController#setSelection triggers onItemSelect, it uses
   mEapUserCertSpinner without adapter.
2. refreshSummary should use parameter preference instead of mPreference.

Bug: 140771897
Test: WifiConfigControllerTest
      WifiWakeupPreferenceControllerTest

Change-Id: I963260bd82e7387052cacae89bdbe46da841e341
2019-09-10 11:41:35 +08:00
Jimmy Chen
33a05692f0 Merge "wifi: support OCSP in Wifi dialog for certifiate-based EAP type" 2019-09-09 02:23:07 +00:00
TreeHugger Robot
9ea11ac24d Merge "[Wi-Fi] Can't change EAP method for a saved enterprise Wi-Fi network" 2019-09-05 10:09:32 +00: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
Jimmy Chen
3612d3ebc9 wifi: support OCSP in Wifi dialog for certifiate-based EAP type
Bug: 136720092
Test: tested with OCSP supported profile
Change-Id: Ieb0fec5026ea06f88d44361d0c579be2a18ed99a
2019-09-05 15:39:12 +08:00
Arc Wang
31a79feccd [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
Merged-In: Iddc1dae53849760f43b41b75262358dff6ba09af
2019-09-05 14:57:07 +08:00
Jimmy Chen
7157508edc Merge "wifi: support SAE password identifier in wifi dialog" 2019-08-28 15:31:18 +00: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
Jimmy Chen
d79363fec6 wifi: support SAE password identifier in wifi dialog
Bug: 138305265
Test: atest FrameworksWifiApiTests
Test: atest FrameworksWifiTests
Test: connect to a WPA3 SAE access point with different
      password/identifer combinations.

Change-Id: Idf1f82faaafa9c5f2212a0fa1dcc2eec53a9dbd5
2019-08-19 13:31:53 +08:00
govenliu
8d6e5d14cb [Wi-Fi] Add a new fragment for configuring a new AccessPoint network.
When configuring a new access point in Wi-Fi settings page, it's hard to figure out there are some other option items after you tapping the "Advanced options" button.

To improve it, use full screen fragment to present the configuration items, so user can see as many items as possible.

Bug: 31052996
Test: Mock this fragment and check each button status run as expected.
Change-Id: I1c8e552fcabb1414bb500d918ed61287bf4aece2
2019-08-10 21:01:01 +08:00
Arc Wang
bde8c0a64d [Wi-Fi] Remove unsupported EAP methods for WPA3-Enterprise 192-bit
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

Bug: 135127581
Test: WifiConfigControllerTest
Change-Id: Ibf904da9407ec803afb8bb995e9df1a2e25f0dcb
Merged-In: Ibf904da9407ec803afb8bb995e9df1a2e25f0dcb
2019-08-08 14:52:08 +08:00
Arc Wang
eca48078d5 [Wi-Fi] Remove unsupported EAP methods for WPA3-Enterprise 192-bit - II
Refine code:
1. Change method name from getSpinnerAdapterWithEapMethods to getSpinnerAdapter
   and apply it to other Spinner adapters.
2. Change method name from getSpinnerArrayWithEapMethodsTts to
   getSpinnerAdapterWithEapMethodsTts and it will
   setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
   for adapters.
3. Remove the code of ag/8693033
4. Improve indentation.

Bug: 135127581
Test: WifiConfigControllerTest
Change-Id: I653eda11ca1b8235c5ecaa1a826a2fddd004d2e1
2019-07-25 14:51:35 +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
Hai Shalom
f2b52be493 Reject SUITE_B_192 network creation for non EAP-TLS
Reject creation of WPA3-Enterprise 192-bit network in Settings app if
the selected EAP method is not EAP-TLS, as mandated by the
specification.

Note that this is just a protection against invalid networks, a UI
change to prevent this in Settings will follow.

Bug: 135127581
Test: atest WifiConfigControllerTest
Test: Create invalid network, verify it is not saved
Change-Id: I2978c2c71a90433778b6187a986e3284e9095d41
2019-07-19 10:54:19 -07: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
Arc Wang
838cbbf539 [Wi-Fi DPP] Remove scanner button of unsaved WiFi network dialogs
Romove it because we may not ensure the network of a QR code is
matching the selected one.

Bug: 134701332
Test: manual visual
Change-Id: I264e921c806f2b335d158fc4cffc48acf69f5c19
2019-06-13 16:17:03 +08:00
Hai Shalom
98aa52dbec [OWE] Support OWE in transition mode
Support OWE in transition mode for devices with OWE support
and devices without OWE support. Scan results will return a
new type of network for OWE in transition networks on devices
that support OWE, and Open for devices that don't support OWE.
Handle the case where Open network is manually added to a device
that supports OWE.

Bug: 132139642
Test: Device with OWE: Connect to Open, OWE-Transition, OWE networks
Test: Device without OWE: Connect to Open, OWE-Transition
Test: Manually create Open network, connect to OWE-Transition
Change-Id: I1a584ccbfec8507803c527ea13933cff6f699ccb
2019-05-13 15:37:44 -07:00
Hai Shalom
3fc9dc3ada [WPA3] Fix connectivity issues with PSK-SAE Transtion mode
Fix two reported issues regarding PSK-SAE transition mode:
1. When phone supports SAE, creating a manual saved network with PSK
and manually connecting would cause the phone to connect but Settings
does not display any connected AP. Phone would not autoconnect.
2. When phone doesn't support SAE, phone cannot connect to an AP in
PSK-SAE Transition mode because the framework always targets the highest
security.

Bug: 132278271
Test: Connect to WPA2 network
Test: Connect to WPA3 network (w/capable phone)
Test: Connect to WPA2/3 Transition w/SAE capable phone
Test: Connect to WPA2/3 Transition w/SAE not-capable phone
Change-Id: I371bcb4b2cccfc8684ecb5db3a768524f7354598
2019-05-10 12:59:23 -07:00
Arc Wang
dae6c695ca Hide Wi-Fi QR code scan button for unsupported Wi-Fi networks
Wi-Fi QR code scan button only shows for the Wi-Fi network which
supports Wi-Fi Easy Connect or ZXing Wi-Fi config format.

Bug: 128847959
Test: manual
Change-Id: If6460ce88748e7b06893bf62060418a8727d3134
2019-03-29 10:17:44 +08:00
Hai Shalom
566101d166 [WPA3] Initialize Suite-B ciphers correctly based on the CA cert type
Initialize Suite-B ciphers correctly based on the CA cert type. Read the
cert type from key store, parse it and get the signature algorithm.
Enforce SHA384, and initialize AllowedSuiteBCiphers based on the
certificate type: RSA or ECSDA.
Wi-Fi alliance requires the use of both ECDSA secp384r1 and RSA 3072
certificates in WPA3-Enterprise 192-bit security networks, which are
also known as Suite-B-192 netowkrs, even though NSA Suite-B-192 mandates
ECDSA only. The use of the term Suite-B was already coined in the
IEEE 802.11-2016 specification for AKM 00-0F-AC but the test plan for
WPA3-Enterprise 192-bit for APs mandates support for both RSA and ECDSA,
and for STAs it mandates ECDSA and optionally RSA. In order to be
compatible with all WPA3-Enterprise 192-bit deployments,

Bug: 128861164
Test: Verify Suite-B initialized correctly with RSA and ECDSA certs.
Test: Associate to SUITE_B_192 AP with RSA certificate
Test: Associate to SUITE_B_192 AP with ECDSA certificate
Change-Id: I5e8b6794e68ed3af5f8c8beac622fff8076a46a1
2019-03-25 14:40:59 -07:00
xshu
900465fde7 Change feature flag to correct flag
Sorry, I provided the wrong flag that was supposed to be fore p2p MAC
randomization. Changing to the correct flag now.

Bug: 127817791
Test: compile
Change-Id: I46828e17411372c5e347b4fd17d853fe95f024a4
2019-03-13 16:37:25 -07:00
Quang Luong
252ae8bed0 Merge "Use getTitle() for AccessPoint display name" 2019-03-11 19:46:03 +00:00
Quang Luong
0df143834a Use getTitle() for AccessPoint display name
Instead of getSsidStr(), AccessPoint display names should use
getTitle() to accomodate Passpoint networks which use a provider
name instead of a single ssid. This change allows the provider
name to be displayed in the network details page, the long
press wifi dialog, and the config editing dialog.

Bug: 118705403
Test: atest WifiSettingsTest
Change-Id: I930d6218c7e464ad20c0c61130e0cb9ce315d9a2
2019-03-08 14:42:29 -08:00
cosmohsieh
fb6b71e2d3 [MAC Randomization] Align feature flag to global flag as framework
Removed feature flag and change to check global flag as framework MAC
randomization api does.

Bug: 127817791
Test: atest WifiPrivacyPreferenceControllerTest
Change-Id: I6d5f67d45c9bdbfb47cddfc402d13627dc5a8a6e
2019-03-08 13:38:27 +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
Sunil Ravi
7d0d684339 WiFi: Replace -1 with LINK_SPEED_UNKNOWN constant
Defined constant LINK_SPEED_UNKNOWN = -1 in WiFiInfo for unknown link
speeds. So replacing -1 with this new macro.

Bug: 124302657
Test: Connect STA to AP and verify the link speeds in network details.
Change-Id: Ie21069984adb02420ca55b08a8cb161aaad2b7b3
2019-02-26 13:32:40 -08:00
Quang Luong
cb0b08aac2 Updated arguments for AccessPoint.getSummary calls
Changed the arguments for getSummary to reflect the changes in
settingslib

Bug: 118705403
Test: none
Change-Id: I2bd02e608a900865ff90dd78463a164fca39c905
2019-01-31 13:03:08 -08:00
Roshan Pius
04dd29fc38 Merge "AccessPoint: App attribution for suggestion/specifier" 2019-01-30 03:03:20 +00: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
Roshan Pius
896cfd538c AccessPoint: App attribution for suggestion/specifier
Bug: 115504887
Bug: 113878056
Test: atest AccessPointTest WifiTrackerTest
Test: Manual UI verification
Change-Id: I104fb6f428e66ab15ab1e0d0358da39652c28115
2019-01-24 08:09:44 -08:00
cosmohsieh
82588849ac [Mac Randomization] Fix perference changing not work and wrong default
value

1. Mac randomization setting would not effect, until reconnecting the network.
Disconnect it and WiFi will soonly connect back.
2. Mac randomization setting of adding network page is default to
"device MAC", correcting to "Randomization"

Bug: 123123123
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: I91f8670ddf81aea89354c4cc9c9a7901b8f3409c
2019-01-16 19:45:32 +00:00
Sunil Ravi
00020f6605 Merge "WiFi: Add Tx and rx link speed in network details" 2019-01-15 18:43:58 +00:00
Sunil Ravi
39d372e676 WiFi: Add Tx and rx link speed in network details
current "link speed" in UI is renamed to "Transmit link speed".
Also Added Receive link speed in network details.

Bug: 120497598
Test: Connected to AP and verified the Rx link speed in Network details.

Change-Id: I01cf7362a27ad78ddfaef68efae4d07cbd14fc55
2019-01-14 16:31:01 -08:00
Hai Shalom
b5c286a4a4 [WPA3] Rename allowedGroupMgmtCiphers to allowedGroupManagementCiphers
Following API Council review:
Rename allowedGroupMgmtCiphers to allowedGroupManagementCiphers in all instances
in order to be consistend with existing members.

Bug: 122616519
Test: atest com.android.server.wifi
Change-Id: I42496a0c9fa1034beffd9b05eeafd2f0a75eb1a8
2019-01-10 12:42:46 -08:00
cosmohsieh
18e3692ea3 Remove bug id for WiFi MAC randomization since feature is ready.
Bug: 117957974
Test: RunSettingsRoboTests
Change-Id: I36955d302d9c365e7985a53c6a2a89026f6ebb34
2018-12-12 02:16:47 +00: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
Hai Shalom
f2f00313bb packages/apps/Settings: Add logic and strings to support WPA3 and OWE
Add and update Wi-Fi security strings, and add logic to enable WPA3
and OWE. Modified WPA2-PSK to WPA2-Personal, and added WPA3-Personal,
Enhanced Open and WPA3-Enterprise.

Bug: 112195778
Test: Basic functional tests
Change-Id: Ia97761a7f0a9e2fee768dfaf3578a2f1090d29c6
2018-11-05 16:40:07 -08:00
Johnson Lu
e936774fa3 Adjust Wifi Privacy preference.
Show Wifi MAC Randomization preference in both "Add network" and "Join
Network" flows.

Bug: 1227787
Test: RunSettingsRoboTests
Change-Id: Iff422eb870e661ceda5ae04f55de802a91f08aeb
2018-10-22 16:49:18 +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
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Daichi Ueura
cbd04dcade Merge "Hide entire hidden field for non-hidden networks" into pi-dev am: 2c793dfeff
am: 1a2153e6ab

Change-Id: Id5dc0b1855520c9071ce3b8c2897f2b69d3b3791
2018-05-23 16:05:02 -07: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