This patch uses the previously introduced TokenBucket to rate limit
ApfProgramEvents, still allowing for burst of ApfProgramEvents when a
new interface is set up (due to ipv4 provisioning, multicast lock, ipv6 RAs
triggering new APF program events in short amounts of time).
Test: new test in IpConnectivityMetricsTest
Bug: 1550402
(cherry picked from commit e1c173d2240a8eedf7685c9371087dc047a6931f)
Change-Id: Idb640dec13ba64180985544b9709a586af66eb6e
Test: IpConnectivityMetricsTest passes. Also manually changed the new
setting and verified the buffer size is as expected after flushing the
buffer.
Bug: 32198637
(cherry picked from commit 05686dbb6b965eb1a54591d2ed2334337886c6ee)
Change-Id: Iefbeac3a688b260fb3f92dfe0bfd9db28e26749d
This patch adds a version field to ipconnectivity.proto and populates it
to 2, which is the logical version number for NYC-MR2.
Test: IpConnectivity{EventBuilder,Metrics}Test pass
Bug: 32127906
(cherry picked from commit d680d4c856f54bea0c60dea74ba4204822391e49)
Change-Id: If8f167c0dc4c1abe0e235e2adfd131168a4ddc52
Guarantees that timeouts are only delivered if a network never
becomes available. Once a network is available the timeout is
canceled.
Bug: 31402633
Test: all timeout related unit tests pass (new one added)
(cherry picked from commit 681fcda5896fd6c94f8a543ef9983c0a0644e87e)
Change-Id: I7cd3086544c881915fc6dbf14b87a24ab0cd8748
Test methods not tagged with @{Small,Medium,Large}Test will not appear
in the Android Platform Continuous Testing dashboard.
Test methods tagged with @LargeTest will not be run in the Android
Platform Continuous Testing dashboard.
Test: ApfTest passes ($runtest frameworks-net)
Bug: 31479480
(cherry picked from commit 4195c28347cc100954f83c3c92b4dde4673f8608)
Change-Id: Ia215fc8e2ccc61f6223c24fdf390e1e759de302f
This was broken by the implementation of IPv6 tethering, which
relies on various private classes which end up calling unmockable
final classes like NetworkInterface.
Making everything public like this is almost certainly not the
best way of fixing this test, but on the other hand there is
value to the test continuing to pass.
Test: runtest frameworks-net # Everything passes.
Test: IPv6 tethering continues to work.
(cherry picked from commit 7e0eeca8ba4063d0d35dda9a8dfcc612e45efb87)
Change-Id: I8a3cf466871c026f4ae0f5cfa73071338cdf5b7e
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 ecc986d430f4b8158f177ed97d2edb741f11ff71)
Change-Id: I993eeaa5dec001c39389023f355f506129b356e7