diff options
author | lucaslin <lucaslin@google.com> | 2021-04-21 17:41:31 +0800 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-05-20 00:00:34 +0000 |
commit | 63c67f0304d973f8f26e77b866eda2b1d34340d3 (patch) | |
tree | 65fac99c954177385be4a8963eef83bea4e68a4c | |
parent | ba595d5debf2a214e05a8a774be658b09b354d1a (diff) | |
download | base-63c67f0304d973f8f26e77b866eda2b1d34340d3.tar.gz |
Remove sendNetworkConditionsBroadcast
sendNetworkConditionsBroadcast is removed, so
TestNetworkStackService.kt cannot override it anymore,
otherwise there will be a build break when running this
test.
Also add a comment for NETWORK_CONDITIONS_MEASURED in
AndroidManifest.xml.
Bug: 175213041
Test: atest FrameworksNetIntegrationTests
Change-Id: I7b43940dc32826c70fa82f471b35bc5cb8394aad
Merged-In: I7b43940dc32826c70fa82f471b35bc5cb8394aad
(cherry picked from commit c737926795a8cedab091cf01c30914a1bf844da1)
-rw-r--r-- | core/res/AndroidManifest.xml | 2 | ||||
-rw-r--r-- | tests/net/integration/src/com/android/server/net/integrationtests/TestNetworkStackService.kt | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 049959823942..b5fe21d81fd8 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -396,6 +396,8 @@ <protected-broadcast android:name="android.net.wifi.p2p.action.WIFI_P2P_PERSISTENT_GROUPS_CHANGED" /> <protected-broadcast android:name="android.net.conn.TETHER_STATE_CHANGED" /> <protected-broadcast android:name="android.net.conn.INET_CONDITION_ACTION" /> + <!-- This broadcast is no longer sent in S but it should stay protected to avoid third party + apps broadcasting this and confusing old system apps that may not have been updated. --> <protected-broadcast android:name="android.net.conn.NETWORK_CONDITIONS_MEASURED" /> <protected-broadcast android:name="android.net.ConnectivityService.action.PKT_CNT_SAMPLE_INTERVAL_ELAPSED" /> diff --git a/tests/net/integration/src/com/android/server/net/integrationtests/TestNetworkStackService.kt b/tests/net/integration/src/com/android/server/net/integrationtests/TestNetworkStackService.kt index 8c2de4035d0b..649f71d4293f 100644 --- a/tests/net/integration/src/com/android/server/net/integrationtests/TestNetworkStackService.kt +++ b/tests/net/integration/src/com/android/server/net/integrationtests/TestNetworkStackService.kt @@ -59,7 +59,6 @@ class TestNetworkStackService : Service() { private class NetworkMonitorDeps(private val privateDnsBypassNetwork: Network) : NetworkMonitor.Dependencies() { override fun getPrivateDnsBypassNetwork(network: Network?) = privateDnsBypassNetwork - override fun sendNetworkConditionsBroadcast(context: Context, broadcast: Intent) = Unit } private inner class TestNetworkStackConnector(context: Context) : NetworkStackConnector( @@ -94,4 +93,4 @@ class TestNetworkStackService : Service() { cb.onNetworkMonitorCreated(NetworkMonitorConnector(nm, TestPermissionChecker())) } } -}
\ No newline at end of file +} |