Commit Graph

29 Commits

Author SHA1 Message Date
Steven Liu
c1477650c9 Introduce a WifiTrackerLibProvider.
This make the WifiTrackerLib can be customized.

Bug: 149540986
Test: manual test wifi picker, and atest com.android.settings
Change-Id: I1418ae39c895ce2ff87f18005a226a4835f9e083
2021-01-06 08:44:34 -08:00
Arc Wang
97659b2dfc [Wi-Fi] Apply WifiTrackerLib objects in NetworkRequestDialogFragment
Bug: 152571756
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: Ie6f63cb8aa81d61bfa41687c73f8c8764cb3cefe
2020-06-19 19:15:42 +08:00
Roshan Pius
81f9391105 NetworkRequestDialog: Exit the dialog on connect failure
Connection failure (similar to connection success) is the end of the
processng of a request. We should dismiss the dialog on connection
failure.

Bug: 158844146
Test: Manual tests - Simulate connection failure and ensure that the
dialog vanishes with a toast.

Change-Id: I625ca76298ed549dbed76d398aea0c957c9102fc
2020-06-12 19:28:16 +00:00
Arc Wang
1efd7878c7 [Wi-Fi] Modify NetworkRequestDialog title & summary
Design change for UX improvement.

Bug: 155348488
Test: manual visual
Change-Id: I07d441f6fda8017cc9f4561ef64d57ff8db86f0f
2020-04-30 15:34:43 +08:00
Arc Wang
5f23a43660 [Wi-Fi] Fix transition mode problems
Replace SECURITY_PSK_SAE_TRANSITION & SECURITY_OWE_TRANSITION with
AccessPpoint#isPskSaeTransitionMode() &
AccessPpoint#isPskOweTransitionMode()

Bug: 144320676
Bug: 144320649
Bug: 144325162
Bug: 144321574
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi

Change-Id: Ic3c7ac1238a51b6e215ed63761720d2bc371d012
2019-12-06 18:17:07 +08:00
Arc Wang
be55640ae3 [Wi-Fi] Updates internal AccessPoint list upon onAccessPointsChanged
Updating access point list requires WifiTracker's AccessPoints and
WifiNetworkFactory's matching scan results. When WifiNetworkFactory
sends the matching scan results to NetworkRequestDialogFragment, if
WifiTracker still does not receive scan results, UI will not be
updated.
This CL is to update internal AccessPoint list from WifiTracker
upon onAccessPointsChanged callback to reflect results properly.

Bug: 140600730
Test: manual, robotests
Change-Id: I0f9814821b3d56f3c55f1e6419c8b7a03b03589e
Signed-off-by: Daichi Ueura <daichi.ueura@sony.com>
2019-10-18 18:09:19 +08:00
cosmohsieh
a5e0148c7a [NetworkRequest] Implement Single Specified SSID ALTERNATE FLOW V2
Implement new flow for Single SSID mode of NetworkRequestDialog.
There is a new design for single SSID mode of NetworkRequestDialog.

Bug: b/132904234
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: Ice19842243ea6f24a3ea74cf6e90a473080b8983
2019-07-18 12:04:02 +08:00
cosmohsieh
151d5a3c83 [Network Connection] Show full SSID on list item
Long SSID will be cut off, because ellipsized. Show full SSID to gain
better UX.

Bug: 130198869
Test: manual
Change-Id: I14376ff7fb922439a2d664433a94740cc06cd99a
2019-04-16 11:38:25 +08:00
cosmohsieh
03b8cd76ac [Network Connection] Correct canceling dialog behavior
Use setCancelable() rather than setCanceledOnTouchOutside() for better
code smell and consisting with general not canceling behavior.
The back key and touching outside will not cancel this dialog for better
UX.

Bug: 128877712
Test: atest NetworkRequestDialogFragmentTest
Change-Id: I19bc5637a7307610e34db15d54c1d80d5b7e379b
2019-03-29 10:15:21 +08:00
Cosmo Hsieh
aaf6e03499 Merge "[Network Connection] Don't dismiss dialog when touching outside of dialog" 2019-03-22 01:45:53 +00:00
cosmohsieh
3babe9e908 [Network Connection] Don't dismiss dialog when touching outside of
dialog

To Improve user experience, prevent dialog dismissing from touching outside
of the dialog

Bug: 128877712
Test: atest NetworkRequestDialogFragment
Change-Id: Idfa90c3647f5cf766aaa63fdb8a829fec5db5934
2019-03-21 13:22:36 +08:00
cosmohsieh
5944fa9427 [Network Connection] Implement Unavailable callback when the user cancels
UI should invoke NetworkRequestUserSelectionCallback.reject() callback when the user clicks cancel.

Bug: 128876386
Test: atest NetworkRequestDialogFragment
Change-Id: Ia5faedf8cc7113a602a4cda10b3252d02c3c8876
2019-03-21 09:37:49 +08:00
cosmohsieh
b795dcbcd1 [Network Connection] Implement new UI changing
1. Change title to multi-lines display
2. Add "SingleSpecifiedSSID" mode, will have connect button
3. Don't pop error dialog, if there is connection failure. Let user
retry.
4. Hide progress icon if list item exists

Bug: 128586511
Test: atest NetworkRequestDialogFragmentTest
Change-Id: Icc560e4882fbcd941574e44690a27d5082a7c4c7
2019-03-19 10:15:33 +08:00
cosmohsieh
1e687606dd [Network Connection] Implement "show all" button for
NetworkRequestDialog

Add "show all" button to NetworkRequest dialog to let user be able to
show all AccessPoints of onMatch() callback.

Bug: 117985692
Test: atest NetworkRequestDialogFragmentTest
Change-Id: I604083fd0f3ea98208d860a327733699cd4664d7
2019-02-18 11:42:59 +08:00
Cosmo Hsieh
846cacbd0b Merge "[Network Connection] Implement dialog title for new design" 2019-01-25 01:44:28 +00:00
cosmohsieh
6897c55396 [Network Connection] Implement dialog title for new design
Change title to contain app name from intent.

Bug: 123158944
Test: atest NetworkRequestDialogFragmentTest
Change-Id: If3acea5adec8a5e2bbf712735fda9e6975e71984
2019-01-24 09:35:38 +08:00
Cosmo Hsieh
2cea2d4cb3 Merge "[Network Connection] Implement toasting after wifi is connected" 2019-01-23 02:17:21 +00:00
cosmohsieh
107e16ef28 [Network Connection] Correct title padding
Padding of dialog title needs to align design doc.

Bug: 123161302
Test: manual
Change-Id: I4b8a3d12dd309b0c1812694c42c7e0d283c619f2
2019-01-22 17:21:17 +08:00
cosmohsieh
b9c4797387 [Network Connection] Implement toasting after wifi is connected
When wifi is connected (onUserSelectionConnectSuccess), making a toast
infos user and closed the dialog.

Bug: 123160958
Test: atest NetworkRequestDialogFragmentTest
Change-Id: I85ab648188018773e1f76541d18903c733bc3e69
2019-01-22 13:49:10 +08:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
cosmohsieh
c1854cae9a Implement persisting time for onUserSelectionConnectSuccess.
When onUserSelectionConnectSuccess callbacks, holding a second for user
to be aware of success connection. Then, go to destory network request dialog.

Bug: 117399926
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi.NetworkRequestDialogFragmentTest
Change-Id: I12d8fb2e8955cf24ddad43d1fe8b863682b6ae32
2019-01-08 12:08:11 +08:00
cosmohsieh
a83b304670 Change privacy setting string
Change privacy setting (mac randomized) string

Test: manual and robotests
Change-Id: I264c89e0b8ccaeff0a057ff7d791d006a5e7d7cd
2018-12-28 10:07:20 +08:00
cosmohsieh
65c8d1df69 Add internal WifiTracker to get correct AccessPoint for
WifiNetworkRequestDialog

Use WifiTracker to get correct and constantly updated Wifi status of AccessPoint.

Bug: 117399926
Test: RunSettingsRoboTests
Change-Id: I5e4316f6acb7787dcaab150a293068852beb76e0
2018-12-18 10:40:54 +08:00
cosmohsieh
64b894f81d Implement getConfig() method to get WifiConfiguration
Make a duplicated function of WifiConfigController.getConfig(). This
function could get a new WifiConfiguration from input AccessPoint or
ScanResult.
Should be removed if there is standard one in framework.

Bug: 120827021
Test: RunSettingsRoboTests

Change-Id: Ia5981e8d41f434c097b464a2bfe18e1356f7b087
2018-12-14 09:54:34 +00:00
cosmohsieh
38a574173e Rename wifi/NetworkRequestTimeoutDialogFragment to wifi/NetworkRequestErrorDialogFragment for extending usage.
ErrorDialogFragment contains two kinds of error dialog (timeout and onAbort).

Bug: 117399926
Test: RunSettingsRoboTests
Change-Id: Iea82a53baba298de66ae988c75d9fb6daca60160
2018-12-07 01:44:52 +00:00
cosmohsieh
da37bb7df7 Add NetworkRequestDialogActivity
Framwork will call this activity to start network requesting process.
This activity is simple activity contained NetworkRequestDialogFragment
and any other dialog generated in this process, aka
NetworkRequestTimeoutDialog.

Bug: 117399926
Test: RunSettingsRoboTests
Change-Id: Ib1df28d12427ed3bd7d4b88ec10e52357564c797
2018-11-27 17:31:25 +08:00
cosmohsieh
75c8805a99 Implement NetworkRequestMatchCallback callback in NetworkRequestDialogFragment
Use this callback to communicate with framework wifi api.
Will get candidates wifi ap list and related callback to select which wifi ap wanted to use, and related operated result status.

Bug: 117399926
Test: RunSettingsRoboTests
Change-Id: Ic8ee678c06f21050761ebb58dc0fe50bc5732e53
2018-11-21 06:33:11 +00:00
cosmohsieh
cf57eb7558 Implement NetworkRequestDialog architecture(cont.)
For NetworkRequestTimeoutDialogFragment, the dialog show after WiFi
scanning timeout or get no WiFi ap to list. Dialog will ask if user
want to continue scanning or cancel.

Bug: 117399926
Test: RunSettingsRoboTests
Change-Id: I0551a753c10265e69a7830833813852a95eab5ef
2018-11-12 11:20:31 +08:00
cosmohsieh
cd192209ef Implement NetworkRequestDialog architecture
Bug: 117399926
Test: RunSettingsRoboTests

Change-Id: Ibf0a62a84bc3de080e4537ba084b0ff9a5e0e9a9
2018-10-31 11:26:00 +08:00