Commit Graph

21 Commits

Author SHA1 Message Date
Bonian Chen
234b698fb2 Revert "[Settings] Support getSystemService(Class<T>)"
This reverts commit d5ccde31a8.

Reason for revert: failure on test cases

Change-Id: I0a179a6ebb5ef1dec566ce6e8facd5f3b82d7c8a
2021-03-30 00:51:15 +00:00
Bonian Chen
d5ccde31a8 [Settings] Support getSystemService(Class<T>)
Add getSystemService(Class<T>) to align the capability with framework
part.

This is a back port from aosp/1639943, aosp/1645152 and aosp/1648047

Bug: 179640862
Test: local
Change-Id: I035db55a71f94000ca35f8d71f03c19208423c73
2021-03-24 00:59:46 +08:00
Chiachang Wang
a1abb8158d Merge "Replace the way to get the network for no internet dialog" am: f26f579c8d am: 33855bfd7e am: b2da781ff9
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1644547

Change-Id: I1a89caad4178c56e3bc45e7aa1ed5bb3ad79ce78
2021-03-19 09:43:49 +00:00
Chiachang Wang
11c37350d9 Replace the way to get the network for no internet dialog
It's a refactor work for incoming connectivity mainline. The
network information contained in the no ineternet notification
action was placed the target network id. The receiver which is
Settings will need to construct the network from the network id
using the hidden Network constructor. Since Network is moving
into module, Settings will not be able to access it. Apps should
use Network instead of network id, so just send the network
object to Settings.

Update the corresponding logic in Settings.

Bug: 172183305
Test: manually test with no internet dialog and check the
      behavior and log
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
      com.android.settings.wifi.WifiNoInternetDialogTest
Change-Id: I75c04d6f1c2159ae990f6015551eb39d99266336
2021-03-18 11:35:05 +00:00
govenliu
90d72813cd [Wi-Fi] Enhance WifiNoInternetDialogTest unit test cases
Add new unit test cases in WifiNoInternetDialogTest.java

The coverage rate of WifiNoInternetDialog will raise from 10% to 95%

Bug: 151696220
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiNoInternetDialogTest
Change-Id: I8256c0adebee9a7f557b467a6ea11cad09e02b33
2020-05-29 14:53:14 +08:00
Chalard Jean
e0b336d7a4 Adjust code for API council feedback
Bug: 151322799
Test: SettingsUnitTests

Change-Id: I5ff389f3f707e5538979830c2252455bea5bbb88
2020-03-19 13:42:40 +09:00
David Su
6c6e77ed32 Rename removeDoubleQuotes to sanitizeSsid
Bug: 145745815
Test: compiles
Change-Id: Ic2fbb78b30d2c64d584cd94a79b2ed7e5e234440
2020-01-23 18:57:49 -08:00
Arc Wang
1e451cf708 [Wi-Fi] Prevent fatal exception for null intent action
Intent action may be null.

Bug: 139020487
Test: WifiScanModeActivityTest
      WifiNoInternetDialogTest
      WifiDppConfiguratorActivityTest
      WifiDppEnrolleeActivityTest
Change-Id: Ie6119a86aaee1a6b40710705a0ea7d92c24736d6
2019-08-22 13:42:47 +08:00
Lorenzo Colitti
5456b596a2 Disconnect if the user cancels the no/partial connectivity dialog
If the user exits the no Internet or partial connectivity dialog
without taking any action, there is no longer any way to use the
network. So, disconnect the network.

Bug: 130766237
Test: clicking outside dialog disconnects network
Test: orientation changes do not disconnect network
Change-Id: I80c2c98c994dc01e53b32f40332b3f1bd03b6012
2019-06-07 19:43:24 +09:00
lucaslin
7335c594be Modify dialog message for partial connectivity
In some networks, network validation may only get success
result for http probe but fail result for https probe.
For this kind of network, it may still work at some websites
or apps, but user didn't know about that. In order to fix this
issue, we will check if network has partial connectivity and
notify user to make a choice if they want to use this partial
connectivity or not.

Bug: 113450764
Bug: 128489091
Test: 1. Build pass.
      2. make -j44 RunSettingsRoboTests
      ROBOTEST_FILTER=WifiDetailPreferenceControllerTest
      3. Change captive_portal_https_url to https://invalid.com
      to simulate partial connectivity.

Change-Id: I0e87f6f2ede173f45a7b6fcf842b4f9a83d8efa1
2019-03-20 11:41:21 +08:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Chalard Jean
d391f46076 Use the SSID of the network in the no internet dialog
Bug: 77865258
Test: manual & roboelectric
Change-Id: I72f1f74bf004f30a2c38b4c3af977ff09360d1e8
2018-04-16 13:09:03 +09:00
Lorenzo Colitti
c179f33c87 Add a "Don't ask again" checkbox to the avoid bad wifi dialog.
Also update the settings code to reflect the new tristate
semantics of the NETWORK_AVOID_BAD_WIFI setting.

Bug: 31075769
Change-Id: Icd21d8272abe6afd42ee8a41e2c7e1a6af77f0b3
2016-09-20 14:35:59 +09:00
Paul Stewart
49d703319b Bad Wi-Fi: Change strings to carrier specs
Also add a checkbox to persist the value.  However, the logic to
pass this persistence to ConnectivityService has not yet been added.

Bug: 31075769
Test: Visual inspection of dialog (upcoming)
Change-Id: I370ab07ea276b024ce4adc61e10ca085be1c5549
2016-09-16 17:51:16 -07:00
Hugo Benichi
a317684cfc Add a "Cellular data fallback" pref.
Also adjust working of the "lost internet" notification.

Bug: 31075769
Change-Id: I17e18516c9bfdc32b38686191327b6d6f87aed95
2016-09-17 00:30:05 +09:00
Lorenzo Colitti
1449ecd460 Support displaying a dialog when Wi-Fi loses Internet access.
Bug: 31075769
Change-Id: Ia0c76d80591937dc40765c437e5779f3b6dde217
2016-09-15 23:43:00 +09:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Lorenzo Colitti
2593589209 Pass in the netId using intent data, not intent extras.
This allows ConnectivityService to use different PendingIntents
for different dialogs; two PendingIntents that differ in their
data are treated as different, but two PendingIntents that differ
only in their extras are treated as being the same.

Bug: 20081183
Change-Id: Ie1bdcf2a0a0747be815ea528db0cb34f5ab415b9
2015-06-10 23:38:16 +09:00
Lorenzo Colitti
dcc6155426 Reword "no internet access" dialog to conform with mocks.
Bug: 20081183
Bug: 20739299
Change-Id: I63e58dafcba879c56669766f652729a73ef722e2
2015-06-10 23:38:09 +09:00
Lorenzo Colitti
56bd6c338e Address TODOs in WifiNoInternetDialog.
Bug: 20081183
Change-Id: I30a4f04ca892796a674ff0306aafaed485126092
2015-05-20 00:37:38 +09:00
Lorenzo Colitti
877b054bfe Dialog box for networks without an Internet connection
Bug: 20081183
Change-Id: If4866a341382fa37745ae5aa2d10372f052d5dd6
2015-04-15 15:24:20 +09:00