summaryrefslogtreecommitdiff
path: root/framework/src/android/net/util/MultinetworkPolicyTracker.java
Commit message (Collapse)AuthorAgeFilesLines
* Enable strict_updatability_linting in connectivity srcChiachang Wang2021-11-261-2/+6
| | | | | | Bug: 188851968 Test: m lint-check Change-Id: I3cd06ea16f05cb37d9369a48dd0285d8239fd764
* Correct logChiachang Wang2021-07-201-1/+1
| | | | | | | | | Log should print the taken parameter instead of the value of current variable Test: m Bug: 192149168 Change-Id: Ia3b9e607fe8b661a7faea3b46b9697fa85016440
* Trigger the network score update after setting test allow bad wifiChiachang Wang2021-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Avoid bad wifi design has to apply in both wifi and cellular networks. Cellular network should contain POLICY_YIELD_TO_BAD_WIFI policy, then system default network could stay in the wifi after wifi becomes unvalidated. The testing API only update the value but not trigger the avoid bad wifi callback to update the score in the existing cellular network. Thus, if the cellular network is connected before setting the overridden value, the yield to bad wifi policy will not updated to cellular network. The system default network will still switch from unvalidated wifi network to cellular network even wifi network is connected with the avoid bad wifi policy. Update to trigger a reevaluation to update the score in each NetworkAgent in the ConnectivityService. Bug: 192149168 Test: atest CtsNetTestCases:android.net.cts.ConnectivityManagerTest\ #testSetAvoidUnvalidated --rerun-until-failure 100 Change-Id: Ie0f777d0030b66dd306332496192c74f6c183284
* Provide a way to override the avoid bad wifi configurationChiachang Wang2021-06-221-1/+19
| | | | | | | | | | | | | | | ConnectivityManager.setAvoidUnvalidated only works if the config_networkAvoidBadWifi configuration is set to 0 and the NETWORK_AVOID_BAD_WIFI setting is unset. There is no easy way for a testing app to temporary set a test value to verify the behavior of the API. Thus, add a mechanism to allow test app to set a period of time to temporary unstrict the resource configuration, i.e. Temporary simulate config_networkAvoidBadWifi configured to 0. Bug: 186061922 Test: atest CtsNetTestCases FrameworksNetTests Change-Id: If772078c61a9b12926f104d5dfc9c9071e844732
* Migrate framework-connectivity internal resourcesRemi NGUYEN VAN2021-03-201-5/+13
| | | | | | | | | | | Use ServiceConnectivityResources instead. Start by creating resources in the ServiceConnectivityResources package to match the internal configuration, and common overlays. Bug: 182125649 Test: device boots, has connectivity Change-Id: I77a3efca2cd644f9828db1ed5d3cae8070fb8363 Merged-In: I77a3efca2cd644f9828db1ed5d3cae8070fb8363
* Add ConnectivitySettingsManagerpaulhu2021-03-171-4/+4
| | | | | | | | | This class is used to manager the connectivity module related settings. Bug: 182538166 Test: make Change-Id: I5e02e719ce0d305d7c8a45fefb850d7b981f07eb
* [Telephony] Use TelephonyCallback instead of PhoneStateListener part1Zoey Chen2021-03-081-5/+5
| | | | | | | | | Since the redesign of PhoneStateListener, use TelephonyCallback to get the callback of EVENT_* Bug: 167684594 Test: make Change-Id: Ia3b777b12142b104b5798804f50b34748f9bf28c Merged-In: Ia3b777b12142b104b5798804f50b34748f9bf28c
* Use alternative PhoneStateListener formal APIpaulhu2021-02-221-8/+30
| | | | | | | | | | MultinetworkPolicyTracker is part of Connectivity mainline module which cannot call @hide API to register PhoneStateListener. Thus, replace it to formal API. Bug: 171183530 Test: atest FrameworksNetTests Change-Id: Ib02790623e82726aaada33f559226020d1e0019b
* Move module sources to packages/ConnectivityRemi NGUYEN VAN2021-02-011-0/+217
Files that are planned to be part of the connectivity module are grouped in packages/Connectivity, so they can be built separately and moved in one operation with their history into packages/modules/Connectivity. This places the files in the existing framework-connectivity-sources filegroup instead of the current framework-core-sources filegroup. Both are used the same way in framework-non-updatable-sources. Bug: 171540887 Test: m Change-Id: I62d9d91574ace6f5c4624035d190260c3126b91e