This will give us a good place to put all the networking tests.
Fix: 31479480
Test: adb shell am instrument -w -e notClass com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest 'com.android.frameworks.tests.net/android.support.test.runner.AndroidJUnitRunner' # PASS
(cherry picked from commit 5a7c486d70)
Change-Id: I993eeaa5dec001c39389023f355f506129b356e7
Removing the static dependency on guava reduces test compile time
by about 20 seconds on a Z840, thus substantially speeding up the
compile/test cycle.
Make FutureIntent public instead of package-private because it is
used directly by NetworkPolicyManagementServiceTest, which as of
this CL is now in a different package.
(cherry picked from commit 6a64dd2178)
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest # PASS
Test: runtest frameworks-services -c com.android.server.NetworkPolicyManagerServiceTest # PASS
Test: runtest frameworks-services -c com.android.server.net.NetworkStatsServiceTest # PASS
Test: runtest frameworks-services -c com.android.server.NetworkManagementServiceTest # Already failing.
Bug: 31479480
Change-Id: Ifab32c9214e9caab71dbf93b3d3ca88df6f49636
This patch extracts into its own independent test a test sub-block looking
for a race condition when not waiting on handlers to become idle:
there is no way to prevent the race from not happening when looking for
it this way. This makes the test flakky.
This new independent test is tagged with @FlakkyTest(tolerance = 3).
Test: ConnectivityServiceTest passes, with higher probability.
Bug: 31479480
(cherry picked from commit 144810b6cf)
Change-Id: I3c702bd981ed80ed606be0fb52d61eb3d7195a6f
Test: ConnectivityServiceTest updated with test cases.
Test: Manually tested against att-wifi in B42.
Bug: 30222699
(cherry picked from commit dada145a85)
Change-Id: I90c0f97fe0e41de4059bceae7b56ab3a70145696
~Rename only (and any reformatting needed to pass lint) - no
functional changes!
Remove android.net.wifi.nan.STATE_CHANGED from manifest:
redundant/remnant of an older configuration.
(cherry-pick of commit a0edbf0ac8)
Bug: 32263750
Test: All unit tests and integration (sl4a) tests pass.
Merged-In: Ie4ff675fa61041e8fcf6a9bf9900ea835d0a7614
Change-Id: I4206d2fd722dc7dec9df4aee5c818101d7f9dccc
This adds hostname, array of addresses, total count of IP addresses
and uid to the existing pipeline.
Currently ignores the new data it receives, further work will be
done in the subsequent CLs.
Test: for now just the benchmarking, in the future unit and CTS
Bug: 29748723
Change-Id: Ice7db208282934e74f0e1808ffbae96d476c4216
(cherry picked from commit 58a5c98b40)
Check that we tolerate various dependencies not being available.
Bug: 31946071
Test: These are tests
Change-Id: Ic0a9cd6f255ba9ff4c774dee640df1a0bdf8dc39
Additionally, add this utility class to IpManager for compatibility
verification. A follow-on CL will make use of IpManager's local
AvoidBadWifiTracker.
Bug: 31827713
Change-Id: If8c56c3f8076d6a5157ea180e361bbdadc2bc1dd
(cherry-pick of d73faf07606d40d3915d22a72fa14f7ba956d459)
No longer do this in ConnectivityService#tether/untether.
Instead, have Tethering do it when an interface is actually
tethered.
Bug: 31405407
Test: Toggling hotspot now disables data saver
Change-Id: I9910a2e488c30c92d45f817c8f5df0fac5510de6
This patch defines new Settings symbols for
- setting the probe urls for captive portal detection.
- setting which User-Agent to use for captive portal detection.
The existing default values for these settings are not changed, i.e:
- HTTP and HTTPS probes urls are unchanged.
- the fallback probe is not used.
- User-Agent is empty by default.
Bug: 29367974
Change-Id: I6e4b3b172e56b8b67fffa4b51f776d68d5851f25
This patch adds the possitibility to send a 3rd fallback validation
probe in sendParallelHttpProbes when neither the 1st http probe nor the
https probe came back with a conclusive answer.
This 3rd probe is only used for trying again captive portal detection
and does not return success, so that network validation always fails if
the https probe fails.
In addition, the url reveals a captive portal is now sent to the
CaptivePortalLoginActivity so that all three probes can use different
urls.
Bug: 29367974
Change-Id: I7385fde1aa1316d94aac350af0e956cb193aa4ee
When a network goes into the background, tell netd to set the
network's permission to NETWORK. Also, close all TCP sockets on
that network, to prevent long-lived TCP connections from staying
on it and possibly continuing to use metered data.
Bug: 23113288
Change-Id: Ie89c1940b6739160e25c6e9022b8b977afb3e16e
This patch connects existing IpConnectivityLog to the new
IpConnectivityMetrics service:
- IpConnectivityLog is now an independent class that pushes events
directly to the new IpConnectivityMetrics service.
- DnsEventListenerService is moved from MetricsLoggerService to
IpConnectivityMetrics.
- this patch also features end to end tests from IpConnectivityLog to
IpConnectivityMetrics dumpsys output.
Bug: 31254800
Change-Id: I4fe4a209eedde2814d5f13c574a1a0d854bd05c9
This patch moves ipconnectivity.proto and companion serialization
classes from /vendor/google/app/ConnectivityMetrics into the framework
services jar.
This will allow to implement a dumpsys interface for IpConnectivity
metrics events defined in android.net.metrics that output metrics as
a serialized proto.
Bug: 31254800
Change-Id: Ia4449103fd7222c9d899352fea2dce47a790a49c
Currently, when the avoid bad wifi setting changes, we rematch
all networks and requests, but do not update any NetworkFactories
with new scores. This means that if a wifi network's score goes
down as a result of enabling bad wifi avoidance, we will not look
for another network (e.g., cell data) to satisfy its requests.
This makes it so that when the user enables avoiding bad wifi,
we will attempt to bring up cell data will if it is not already
connected.
Bug: 31075769
Change-Id: Ie5b685be8676999adea8c9ecbbc1abb92f81a74f
No longer do this in ConnectivityService#tether/untether.
Instead, have Tethering do it when an interface is actually
tethered.
Bug: 31405407
Test: Toggling hotspot now disables data saver
Change-Id: I9910a2e488c30c92d45f817c8f5df0fac5510de6