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
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
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
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
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
Also update the settings code to reflect the new tristate
semantics of the NETWORK_AVOID_BAD_WIFI setting.
Bug: 31075769
Change-Id: Icd21d8272abe6afd42ee8a41e2c7e1a6af77f0b3
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
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