Commit Graph

10 Commits

Author SHA1 Message Date
Shen Lin
72e5a7ea21 Fix crash when showing error dialog in NetworkRequestDialogActivity
Fix: 253913148
Test: manual
Change-Id: I23593da1ef6d72806f22d3501b06a8e7abadb100
2022-10-17 09:30:16 +08:00
Weng Su
98d30c880d Fix ConnectivityManager.requestNetwork crash issue when try again
- When the user requests "try again", the Network-Request-Dialog will be
  recreated. If the Wi-Fi framework sends the callback result at this
  time, the Network-Request-Dialog may not be ready at the moment,
  causing the NPE to crash.

- Add NPE checks to avoid crash issues.

Bug: 220679437
Test: manual test
make RunSettingsRoboTests \
  ROBOTEST_FILTER=NetworkRequestDialogActivityTest

Change-Id: I8e48a29649e72d9f8c67c4ac24f0eb27ba600dae
2022-03-22 18:14:22 +00: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
govenliu
ae6628bd02 [Wi-Fi] Enhance NetworkRequestDialogActivityTest unit test cases
Add new unit test cases in NetworkRequestDialogActivityTest.java

The coverage rate of NetworkRequestDialogActivity will raise from 48% to 91%

Bug: 151696220
Test: make RunSettingsRoboTests ROBOTEST_FILTER=NetworkRequestDialogActivityTest
Change-Id: I6530815ded8d21d01d5da1d7ee5f38ef190d3863
2020-06-01 10:58:11 +08:00
David Su
6c6e77ed32 Rename removeDoubleQuotes to sanitizeSsid
Bug: 145745815
Test: compiles
Change-Id: Ic2fbb78b30d2c64d584cd94a79b2ed7e5e234440
2020-01-23 18:57:49 -08:00
David Su
d4f077f1e2 Settings: Clean up WifiManager APIs
Promoting WifiManager#registerSoftApCallback() and
WifiManager#registerNetworkRequestMatchCallback()
to @SystemApi.

Changed method signatures to conform to API guidelines.

Also removed dead code: WifiManager#getWifiState()
never returns WifiManager#ERROR.
Remove reference to it, since it is an @hide API.

Bug: 143970861
Test: compiles
Change-Id: If4294d106f0acb5c67b5eab1f6f99bc52efc10f2
2019-11-09 14:54:15 -08:00
cosmohsieh
0f2773fb78 [Network Connection] Call NetworkRequestUserSelectionCallback#reject() if user quit activity without selection
Call NetworkRequestUserSelectionCallback#reject() to notify framework that user quit this request without
selecting any network.

Bug: 138855477
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi.NetworkRequestErrorDialogFragmentTest
Change-Id: I4b06c9772598ab3f9416f32456cd0a65e2d70d68
2019-09-05 01:06:10 +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
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