Commit Graph

3116 Commits

Author SHA1 Message Date
Hugo Benichi
b2bbc4645f DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents am: f2de19cb5c -s ours am: 6765bc08d0 -s ours am: 4686a077f6
am: ea10952568  -s ours

Change-Id: Ia453e3c806be8f58ff96e4b760de1c6a41cc8757
2016-12-09 04:16:09 +00:00
Hugo Benichi
502b338ee8 DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings am: d8cee631fa -s ours am: f3b4c26453 -s ours am: 4c02563e0d
am: 0d0a5a1f5b  -s ours

Change-Id: Ic511ed8370c3a388bdc77f064cbe25bc434d927d
2016-12-09 04:14:15 +00:00
Hugo Benichi
99b362bd90 DO NOT MERGE: IpConnectivity metrics: add version number am: 8c938f0957 -s ours am: 0e67ef7d3f -s ours am: c09378320a
am: cf43c0310a  -s ours

Change-Id: I859f9b7ebdf93c06841a631e616a88270a8aebae
2016-12-09 04:10:50 +00:00
Hugo Benichi
ea10952568 DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents am: f2de19cb5c -s ours am: 6765bc08d0 -s ours
am: 4686a077f6

Change-Id: Ia32470ecf8c0dd918994f9d0bccb20248c3b02d1
2016-12-09 04:01:20 +00:00
Hugo Benichi
0d0a5a1f5b DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings am: d8cee631fa -s ours am: f3b4c26453 -s ours
am: 4c02563e0d

Change-Id: Ib8045e9d97c0928baa0c0a4a752f544aaa1fe790
2016-12-09 03:59:36 +00:00
Hugo Benichi
cf43c0310a DO NOT MERGE: IpConnectivity metrics: add version number am: 8c938f0957 -s ours am: 0e67ef7d3f -s ours
am: c09378320a

Change-Id: I5b970302c258569638890a49b3455e43614ec63a
2016-12-09 03:56:29 +00:00
Hugo Benichi
4686a077f6 DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents am: f2de19cb5c -s ours
am: 6765bc08d0  -s ours

Change-Id: I9e3ca112a654018d9d0b72ba1b0963e7fb678cf0
2016-12-09 03:46:50 +00:00
Hugo Benichi
4c02563e0d DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings am: d8cee631fa -s ours
am: f3b4c26453  -s ours

Change-Id: I7f2eee043702be1a8878851793b9b17bdb89766b
2016-12-09 03:45:08 +00:00
Hugo Benichi
c09378320a DO NOT MERGE: IpConnectivity metrics: add version number am: 8c938f0957 -s ours
am: 0e67ef7d3f  -s ours

Change-Id: I05ffe76ca4f266bd341fc298cbc03da62991e4bb
2016-12-09 03:41:57 +00:00
Hugo Benichi
f2de19cb5c DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents
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 811c4cec75)

Change-Id: Idb640dec13ba64180985544b9709a586af66eb6e
2016-12-09 11:21:31 +09:00
Hugo Benichi
d8cee631fa DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings
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 d5f78a08b4)

Change-Id: Iefbeac3a688b260fb3f92dfe0bfd9db28e26749d
2016-12-09 11:21:26 +09:00
Hugo Benichi
8c938f0957 DO NOT MERGE: IpConnectivity metrics: add version number
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 79a739cbf3)

Change-Id: If8f167c0dc4c1abe0e235e2adfd131168a4ddc52
2016-12-09 11:21:11 +09:00
Etan Cohen
b305f612b2 DO NOT MERGE: [CS] Remove timeout event after first available am: 69e6a108a5 -s ours am: a8b73b23d6 -s ours am: 734e6ff49e
am: f694f1b07b  -s ours

Change-Id: I1919ee28071c2281896a2f7fbb3d6aadf4f47cae
2016-12-08 17:53:04 +00:00
Lorenzo Colitti
b93d57b7c4 DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net. am: c97a4587c3 -s ours am: d1e22a3f07 -s ours am: 905198e0b1
am: d1c44982f0  -s ours

Change-Id: I3613a50627a6722e3c337caaa2880d96f1b39beb
2016-12-08 17:49:56 +00:00
Lorenzo Colitti
4b9f1a4b45 DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils. am: 9d6921c144 -s ours am: bcb7e32954 -s ours am: 4552680f94
am: 0acd24ffa2  -s ours

Change-Id: I07d5fdbb7285da095676aa1612df232d77d41b48
2016-12-08 17:49:10 +00:00
Lorenzo Colitti
bc3fd9ed5a DO NOT MERGE: Move FakeSettingsProvider to a common location. am: 91f851c6ea -s ours am: a84ede299c -s ours am: 9cd69e7aad
am: 86b4aea33d  -s ours

Change-Id: I53d3ceb607580cc0a04d414cef11f69d6877be21
2016-12-08 17:48:25 +00:00
Hugo Benichi
3a95bb4a29 DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such am: 89b3c8e11c -s ours am: e47b0886ad -s ours am: 29fc948aa7
am: 3282cca84e  -s ours

Change-Id: Ia5e678bc4297f8d6531d7b8fb6cc1085d2877947
2016-12-08 17:47:03 +00:00
Calvin On
75229c75a0 DO NOT MERGE: Add option to skip and avoid captive portals. am: 488c84ca1f -s ours am: 8006bd5c66 -s ours am: c5585a4fec
am: b0e87a6774  -s ours

Change-Id: I6af06157789b0eed11588d697e42776cdaafdb11
2016-12-08 17:46:08 +00:00
Erik Kline
c1eab1cb01 DO NOT MERGE: Support timeouts for requestNetwork() invocations. am: 950bfc31f9 -s ours am: eb6be2c826 -s ours am: 87dba2f72c
am: eda9d9aa6c  -s ours

Change-Id: I380a34e414f13ff1e55eb872090d2ebc1b81ba7a
2016-12-08 17:41:23 +00:00
Pierre Imai
9bf9711f7a DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is specified for a given network. am: 68902bc1df -s ours am: 8a73b2896d -s ours am: 72ecfb8166
am: 8867178a65  -s ours

Change-Id: I35db4c3ff6b38ba0813f35158a65f519b1b40468
2016-12-08 17:40:19 +00:00
Etan Cohen
f694f1b07b DO NOT MERGE: [CS] Remove timeout event after first available am: 69e6a108a5 -s ours am: a8b73b23d6 -s ours
am: 734e6ff49e

Change-Id: If94bc1b3dd0ed5ad697656303ca434152b4a5b18
2016-12-08 11:34:09 +00:00
Lorenzo Colitti
d1c44982f0 DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net. am: c97a4587c3 -s ours am: d1e22a3f07 -s ours
am: 905198e0b1

Change-Id: I6b52a0383884ad41b1601bdd9cf976f58c0dcefd
2016-12-08 11:31:13 +00:00
Lorenzo Colitti
0acd24ffa2 DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils. am: 9d6921c144 -s ours am: bcb7e32954 -s ours
am: 4552680f94

Change-Id: I261c10f930d32c6d69d0ced4d0d7d81f3357cf63
2016-12-08 11:30:17 +00:00
Lorenzo Colitti
86b4aea33d DO NOT MERGE: Move FakeSettingsProvider to a common location. am: 91f851c6ea -s ours am: a84ede299c -s ours
am: 9cd69e7aad

Change-Id: I3e877a603c1c19af15e5f38d4e0301dfddfc6f39
2016-12-08 11:29:28 +00:00
Hugo Benichi
3282cca84e DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such am: 89b3c8e11c -s ours am: e47b0886ad -s ours
am: 29fc948aa7

Change-Id: If5133073f09b59b0458c1784b9d288f9a176c568
2016-12-08 11:28:34 +00:00
Calvin On
b0e87a6774 DO NOT MERGE: Add option to skip and avoid captive portals. am: 488c84ca1f -s ours am: 8006bd5c66 -s ours
am: c5585a4fec

Change-Id: I7e7f6fa8d643bbd83c9b73614f80d202e3f28f20
2016-12-08 11:27:11 +00:00
Erik Kline
eda9d9aa6c DO NOT MERGE: Support timeouts for requestNetwork() invocations. am: 950bfc31f9 -s ours am: eb6be2c826 -s ours
am: 87dba2f72c

Change-Id: I3cba7c98328a4237105243502fe148ed6a35ef48
2016-12-08 11:22:25 +00:00
Pierre Imai
8867178a65 DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is specified for a given network. am: 68902bc1df -s ours am: 8a73b2896d -s ours
am: 72ecfb8166

Change-Id: I20016d9056888897515e6a4b4296e3ea76f11b61
2016-12-08 11:21:31 +00:00
Etan Cohen
734e6ff49e DO NOT MERGE: [CS] Remove timeout event after first available am: 69e6a108a5 -s ours
am: a8b73b23d6  -s ours

Change-Id: I61fbbf03bc011ae0b6b0e011bfb69dea33195c79
2016-12-08 11:07:46 +00:00
Lorenzo Colitti
905198e0b1 DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net. am: c97a4587c3 -s ours
am: d1e22a3f07  -s ours

Change-Id: I92f0f18ed7ee196f1cdb1369393ff7c4e2c800fc
2016-12-08 11:04:38 +00:00
Lorenzo Colitti
4552680f94 DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils. am: 9d6921c144 -s ours
am: bcb7e32954  -s ours

Change-Id: I377b66283b29bb97e02ec796352bc3a5dbea1454
2016-12-08 11:03:45 +00:00
Lorenzo Colitti
9cd69e7aad DO NOT MERGE: Move FakeSettingsProvider to a common location. am: 91f851c6ea -s ours
am: a84ede299c  -s ours

Change-Id: Ia6f433944c63245436199b8b9b1a022794ab939e
2016-12-08 11:02:57 +00:00
Hugo Benichi
29fc948aa7 DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such am: 89b3c8e11c -s ours
am: e47b0886ad  -s ours

Change-Id: I803b51cae7b20502d11701cb99ab3816d6995555
2016-12-08 11:02:09 +00:00
Calvin On
c5585a4fec DO NOT MERGE: Add option to skip and avoid captive portals. am: 488c84ca1f -s ours
am: 8006bd5c66  -s ours

Change-Id: I9984984de7f72e23fbc11e972ff851a1d2adc6c1
2016-12-08 11:00:46 +00:00
Erik Kline
87dba2f72c DO NOT MERGE: Support timeouts for requestNetwork() invocations. am: 950bfc31f9 -s ours
am: eb6be2c826  -s ours

Change-Id: Id91b2267ffcd7c66a1be8e01761ffb1d943082d3
2016-12-08 10:56:13 +00:00
Pierre Imai
72ecfb8166 DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is specified for a given network. am: 68902bc1df -s ours
am: 8a73b2896d  -s ours

Change-Id: Ic529525e6671da1b6a85890c8eb40238b07da2b3
2016-12-08 10:54:56 +00:00
Etan Cohen
69e6a108a5 DO NOT MERGE: [CS] Remove timeout event after first available
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 88087226a6)

Change-Id: I7cd3086544c881915fc6dbf14b87a24ab0cd8748
2016-12-08 17:13:37 +09:00
Lorenzo Colitti
c97a4587c3 DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.
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 384a9cb1f9)

Change-Id: I993eeaa5dec001c39389023f355f506129b356e7
2016-12-08 17:13:35 +09:00
Lorenzo Colitti
9d6921c144 DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.
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 f59c92bb17)

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
2016-12-08 17:13:35 +09:00
Lorenzo Colitti
91f851c6ea DO NOT MERGE: Move FakeSettingsProvider to a common location.
(cherry picked from commit 1de880a8fa)

Test: runtest frameworks-util -c com.android.internal.util.test.FakeSettingsProviderTest
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest
Test: runtest frameworks-services -c com.android.server.retaildemo.PreloadAppsInstallerTest
Test: runtest frameworks-services -c com.android.server.retaildemo.RetailDemoModeServiceTest
Bug: 31479480
Change-Id: I8d4d4de2937012dd33924f53e68f96241a9b2b4f
2016-12-08 17:13:34 +09:00
Hugo Benichi
89b3c8e11c DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
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 6d278a5693)

Change-Id: I3c702bd981ed80ed606be0fb52d61eb3d7195a6f
2016-12-08 17:13:34 +09:00
Calvin On
488c84ca1f DO NOT MERGE: Add option to skip and avoid captive portals.
Test: ConnectivityServiceTest updated with test cases.
Test: Manually tested against att-wifi in B42.
Bug: 30222699

(cherry picked from commit 3fd101e574)

Change-Id: I90c0f97fe0e41de4059bceae7b56ab3a70145696
2016-12-08 17:13:33 +09:00
Erik Kline
950bfc31f9 DO NOT MERGE: Support timeouts for requestNetwork() invocations.
(cherry-pick of 8616c69985)
(cherry picked from commit 66721821df)

Bug: 21414325
Change-Id: I1a58823a372154589f972b98c4c428eab0e0523e
2016-12-08 17:13:01 +09:00
Pierre Imai
68902bc1df DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is
specified for a given network.

Bug: 10705136

(cherry picked from commit 98f9c2c23b)

Change-Id: I89e2fdfbbfa981d435a2974422d9d9c009872d76
2016-12-08 16:49:22 +09:00
Michal Karpinski
5d4cf49095 DO NOT MERGE Extending DNS event reporting am: ba9dbc0a6d
am: 661283930f  -s ours

Change-Id: Icd67ff044613a33d938f6c21b8a19e95c06c05aa
2016-12-06 11:51:24 +00:00
Michal Karpinski
661283930f DO NOT MERGE Extending DNS event reporting
am: ba9dbc0a6d

Change-Id: Iaccaa3697f14ef111985c87ecbad3b9af81a0760
2016-12-06 11:40:23 +00:00
Michal Karpinski
ba9dbc0a6d DO NOT MERGE Extending DNS event reporting
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

(cherry picked from commit 33fa018898)

Change-Id: I3941b8d6fc1dd578e2af6ed4d3c3d0a722c39918
2016-12-02 17:21:28 +00:00
Michal Karpinski
c47f876734 resolve merge conflicts of 3899d92 to nyc-mr2-dev-plus-aosp
am: 5696ebae40

Change-Id: Icb1db24d5e8727efba92badd310095ff803111af
2016-12-02 11:56:00 +00:00
Michal Karpinski
5696ebae40 resolve merge conflicts of 3899d92 to nyc-mr2-dev-plus-aosp
Change-Id: I9c08147c7a39f3121b5d817c2f498c9ad93066f3
2016-12-02 11:43:02 +00:00
Michal Karpinski
3899d9257b DO NOT MERGE Rename the DnsEventListenerService to NetdEventListenerService
The service will be extended to include listening for connect events as well.

Test: this is just a renaming change

Bug: 29748723
Change-Id: I073187e354fc987222ec0108d7f0d3a422397d5e
2016-11-24 17:05:02 +00:00