Commit Graph

10208 Commits

Author SHA1 Message Date
Aaron Huang
f2fa8eeed8 Merge "Move DhcpInfoTest to frameworks/base/tests/net/common" am: e66ba51271 am: 1b1056647b am: fbb37dbaea am: b624fff2da am: 23469c3550
Change-Id: Ib6c9b7729ec4c348d94d025996efa9a1f436258b
2020-04-17 16:26:45 +00:00
Aaron Huang
23469c3550 Merge "Move DhcpInfoTest to frameworks/base/tests/net/common" am: e66ba51271 am: 1b1056647b am: fbb37dbaea am: b624fff2da
Change-Id: Ibbd62e45a885295c8f369d689369b8537acfefd4
2020-04-17 16:04:59 +00:00
Aaron Huang
b624fff2da Merge "Move DhcpInfoTest to frameworks/base/tests/net/common" am: e66ba51271 am: 1b1056647b am: fbb37dbaea
Change-Id: I335f03257eb3a0b63c6b35527ff5964d677a8c40
2020-04-17 15:40:16 +00:00
Aaron Huang
fbb37dbaea Merge "Move DhcpInfoTest to frameworks/base/tests/net/common" am: e66ba51271 am: 1b1056647b
Change-Id: I7fb30591e0e380f3cf75417bb1d39c81baaaa3f0
2020-04-17 15:18:31 +00:00
Aaron Huang
1b1056647b Merge "Move DhcpInfoTest to frameworks/base/tests/net/common" am: e66ba51271
Change-Id: I7179f2e312d1e8237b211cb60eee5c08cd759197
2020-04-17 14:54:34 +00:00
Aaron Huang
bba8a98a03 [automerger skipped] Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 6be2260534 -s ours am: babaf4a6eb -s ours am: 88ec2e449d -s ours am: 4dd7e2fbf9 -s ours
am skip reason: Change-Id Ic9809e731aa811a51c2f82d189372169d99a5ed9 with SHA-1 e5c0ba325d is in history

Change-Id: Ibd3a930c83539d61844803c1362b6a6f65cb0fa0
2020-04-17 11:57:52 +00:00
Aaron Huang
82f86804b6 [automerger skipped] Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 6be2260534 am: 64e475ef4e -s ours am: b0f3c6e6e5 -s ours am: c3e95384b1 -s ours
am skip reason: Change-Id Ic9809e731aa811a51c2f82d189372169d99a5ed9 with SHA-1 e5c0ba325d is in history

Change-Id: I3ff4cc5733a252ca09e7e3864ecab0f662b8d151
2020-04-17 11:57:21 +00:00
Aaron Huang
4dd7e2fbf9 [automerger skipped] Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 6be2260534 -s ours am: babaf4a6eb -s ours am: 88ec2e449d -s ours
am skip reason: Change-Id Ic9809e731aa811a51c2f82d189372169d99a5ed9 with SHA-1 e5c0ba325d is in history

Change-Id: I1f77475f367149c1a3929dcf6bc711af9ebbd5d6
2020-04-17 11:33:47 +00:00
Aaron Huang
c3e95384b1 [automerger skipped] Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 6be2260534 am: 64e475ef4e -s ours am: b0f3c6e6e5 -s ours
am skip reason: Change-Id Ic9809e731aa811a51c2f82d189372169d99a5ed9 with SHA-1 e5c0ba325d is in history

Change-Id: I1e0fc62e5bdda397a3db9ba8be0dcc4cae504457
2020-04-17 11:33:10 +00:00
Aaron Huang
88ec2e449d [automerger skipped] Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 6be2260534 -s ours am: babaf4a6eb -s ours
am skip reason: Change-Id Ic9809e731aa811a51c2f82d189372169d99a5ed9 with SHA-1 e5c0ba325d is in history

Change-Id: Iec99573d8584492622e1caf85b9879ec63dada8b
2020-04-17 11:17:21 +00:00
Aaron Huang
b0f3c6e6e5 [automerger skipped] Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 6be2260534 am: 64e475ef4e -s ours
am skip reason: Change-Id Ic9809e731aa811a51c2f82d189372169d99a5ed9 with SHA-1 e5c0ba325d is in history

Change-Id: I00a29862733b57decf62241abdc7582cacd156e6
2020-04-17 11:17:00 +00:00
Aaron Huang
babaf4a6eb [automerger skipped] Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 6be2260534 -s ours
am skip reason: Change-Id Ic9809e731aa811a51c2f82d189372169d99a5ed9 with SHA-1 e5c0ba325d is in history

Change-Id: I581e84d6c3e77d294089c4eccc464073191f341a
2020-04-17 11:01:43 +00:00
Aaron Huang
64e475ef4e Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 6be2260534
Change-Id: I2584b86082f224c6fdaa7e4ecc0aac52a92c3427
2020-04-17 11:01:29 +00:00
Aaron Huang
6be2260534 Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev 2020-04-17 10:32:13 +00:00
Aaron Huang
b124dcff2c Move DhcpInfoTest to frameworks/base/tests/net/common
Address comment from aosp/1162443.
Move to FrameworksNetCommonTests so that it can be run in
cts test and presubmit test.

Also change package name from android.net.cts to android.net

Bug: 154299158
Test: atest FrameworksNetTest
      atest CtsNetTestCasesLatestSdk:android.net.DhcpInfoTest
Change-Id: I42a965ae5cb748fdd80b4d5c0f8b26f36f74be72
2020-04-17 18:26:20 +08:00
Bruce Chen
5264d1d113 [automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 0735c5f589 am: bb3cf385bb -s ours am: 1f646ccece -s ours am: 079fa3d6cc -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 366d6f9ada is in history

Change-Id: I46e698b5b417dfc0b2a9a698a3ed5cfa4041b22d
2020-04-17 09:02:21 +00:00
Automerger Merge Worker
dcd43baac8 Merge "[automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 0735c5f589 -s ours am: 24ada6df25 -s ours" into rvc-d1-dev-plus-aosp am: 82b8219cc3 -s ours am: b6b4a9bce2 -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 366d6f9ada is in history

Change-Id: I6aefd74d520945c95769a3256df6783495237c9c
2020-04-17 09:01:37 +00:00
Bruce Chen
079fa3d6cc [automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 0735c5f589 am: bb3cf385bb -s ours am: 1f646ccece -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 366d6f9ada is in history

Change-Id: Ib88ec87dd3e06f06710e2a6d503e6fd43dc3abc7
2020-04-17 08:47:06 +00:00
Automerger Merge Worker
b6b4a9bce2 Merge "[automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 0735c5f589 -s ours am: 24ada6df25 -s ours" into rvc-d1-dev-plus-aosp am: 82b8219cc3 -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 366d6f9ada is in history

Change-Id: Ifc11762823812bfd7a72e4b8a93d6c0a283ed407
2020-04-17 08:46:53 +00:00
Aaron Huang
07c36b1720 This contains a squash of two changes
>>>>>>>>>>>>>>>>>>>>>>
aosp/1284588
Adjust permission of NetworkProvider related API

- Allow an app holds NETWORK_SETTINGS to acess registerNetworkProvier()
  and unregisterNetworkProvider().
- To access declareNetworkRequestUnfulfillable(), allow an app holds
  MANAGE_TEST_NETWORKS to declare a unfulfillable request that contains
  TRANSPORT_TEST transport.

This makes easier to write cts to test.
>>>>>>>>>>>>>>>>>>>>>>
aosp/1285957
Add cts test for NetworkProvider

It will skip whole tests on Q device since NetworkProvider class
is introduced in R.

Result on Q device would be:
[1/1] android.net.NetworkProviderTest#skippedClassForDevSdkMismatch: IGNORED (3ms)
>>>>>>>>>>>>>>>>>>>>>>
Bug: 153614605
Bug: 153613690
Bug: 153612373
Test: atest FrameworksNetTests
      atest CtsNetTestCases:android.net.NetworkProviderTest
Test: atest CtsNetTestCasesLatestSdk:android.net.NetworkProviderTest
Change-Id: Ib6f42b8f0e94e8c2715a030587e065864edff25b
Merged-In: Ic9809e731aa811a51c2f82d189372169d99a5ed9
Merged-In: If7bfc7fae503e3497c37754697d0b148ff4cab3b
(cherry picked from commit 10138d42a8f3892fcdb129a39409efe42873f6fe)
2020-04-17 08:45:29 +00:00
Bruce Chen
1f646ccece [automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 0735c5f589 am: bb3cf385bb -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 366d6f9ada is in history

Change-Id: I4895ee75b1b1143fd4a05f7cc3e6adf20166fa87
2020-04-17 08:45:01 +00:00
Bruce Chen
b197a57dc7 [automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 0735c5f589 -s ours am: 24ada6df25 -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 366d6f9ada is in history

Change-Id: I1b891ee48ce069985de87a0399305cb6339ed7a7
2020-04-17 08:44:40 +00:00
Bruce Chen
bb3cf385bb Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 0735c5f589
Change-Id: I652f7383c805d0f5fc2274a731f8267336da53ec
2020-04-17 08:30:46 +00:00
Bruce Chen
24ada6df25 [automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 0735c5f589 -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 366d6f9ada is in history

Change-Id: Idd90cbeb0b95a28e160a3511f7239eefa51b5a92
2020-04-17 08:30:40 +00:00
Lorenzo Colitti
54eb138fd9 [automerger skipped] Merge "Support changing the NAT64 prefix without removing it." into rvc-dev am: 535d087c23 -s ours am: 25e390141b -s ours am: b09e1d6e34 -s ours am: 0399c8413f -s ours
am skip reason: Change-Id I789fe9d46d3ac5d074ae697d23013f24a9e0246d with SHA-1 e5c66bd083 is in history

Change-Id: I361966cec70af979471ad9289ae0dadf72d52909
2020-04-17 08:28:17 +00:00
Automerger Merge Worker
2d46a1b1b7 Merge "[automerger skipped] Merge "Add a function to process LinkProperties coming from an agent." into rvc-dev am: 448beb4c26 -s ours am: f11e17cac5 -s ours" into rvc-d1-dev-plus-aosp am: effb2bc439 -s ours am: 2b3dd1b077 -s ours
am skip reason: Change-Id Ibeeb5f79e8afd3350c935934713d7882f2e0281f with SHA-1 3e586b9676 is in history

Change-Id: If4a91d979855df86f6bd53166557bab82d7fe8dc
2020-04-17 08:28:04 +00:00
Lorenzo Colitti
3b6451ff7e [automerger skipped] Merge "Support changing the NAT64 prefix without removing it." into rvc-dev am: 535d087c23 am: 44f4659cd1 -s ours am: 44eb07abe1 -s ours am: bc359cd270 -s ours
am skip reason: Change-Id I789fe9d46d3ac5d074ae697d23013f24a9e0246d with SHA-1 b3e329c4b3 is in history

Change-Id: Iebe4e4670f5678f0768de6bd86d2373b8e648f74
2020-04-17 08:27:23 +00:00
Automerger Merge Worker
0cf6e49636 Merge "[automerger skipped] Merge "Add a function to process LinkProperties coming from an agent." into rvc-dev am: 448beb4c26 am: 158e61cb28 -s ours" into rvc-d1-dev-plus-aosp am: ecd7419263 -s ours am: 50630827f1 -s ours
am skip reason: Change-Id Ibeeb5f79e8afd3350c935934713d7882f2e0281f with SHA-1 1b6f19d003 is in history

Change-Id: Iea5a3ead536419ae585b9445ba052e1ce1454510
2020-04-17 08:27:01 +00:00
Bruce Chen
0735c5f589 Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev 2020-04-17 08:25:23 +00:00
Lorenzo Colitti
0399c8413f [automerger skipped] Merge "Support changing the NAT64 prefix without removing it." into rvc-dev am: 535d087c23 -s ours am: 25e390141b -s ours am: b09e1d6e34 -s ours
am skip reason: Change-Id I789fe9d46d3ac5d074ae697d23013f24a9e0246d with SHA-1 e5c66bd083 is in history

Change-Id: I3739e103c93fde00e1cb7985ff20a2a8bfe0b1fa
2020-04-17 08:11:52 +00:00
Automerger Merge Worker
2b3dd1b077 Merge "[automerger skipped] Merge "Add a function to process LinkProperties coming from an agent." into rvc-dev am: 448beb4c26 -s ours am: f11e17cac5 -s ours" into rvc-d1-dev-plus-aosp am: effb2bc439 -s ours
am skip reason: Change-Id Ibeeb5f79e8afd3350c935934713d7882f2e0281f with SHA-1 3e586b9676 is in history

Change-Id: I6d56955cc91fe012c8db82d827fdaf54a2ab59ad
2020-04-17 08:11:39 +00:00
Lorenzo Colitti
bc359cd270 [automerger skipped] Merge "Support changing the NAT64 prefix without removing it." into rvc-dev am: 535d087c23 am: 44f4659cd1 -s ours am: 44eb07abe1 -s ours
am skip reason: Change-Id I789fe9d46d3ac5d074ae697d23013f24a9e0246d with SHA-1 b3e329c4b3 is in history

Change-Id: I7c98d2aa67a9bcaf4d349a21565a94b83a0ad23d
2020-04-17 08:11:23 +00:00
Automerger Merge Worker
50630827f1 Merge "[automerger skipped] Merge "Add a function to process LinkProperties coming from an agent." into rvc-dev am: 448beb4c26 am: 158e61cb28 -s ours" into rvc-d1-dev-plus-aosp am: ecd7419263 -s ours
am skip reason: Change-Id Ibeeb5f79e8afd3350c935934713d7882f2e0281f with SHA-1 1b6f19d003 is in history

Change-Id: Id4f8e797810ed3e83ca5e36c62f74c9285883ece
2020-04-17 08:10:41 +00:00
Lorenzo Colitti
b09e1d6e34 [automerger skipped] Merge "Support changing the NAT64 prefix without removing it." into rvc-dev am: 535d087c23 -s ours am: 25e390141b -s ours
am skip reason: Change-Id I789fe9d46d3ac5d074ae697d23013f24a9e0246d with SHA-1 e5c66bd083 is in history

Change-Id: Iaa7de3faab9b866c81d2007cacc926b311c6214c
2020-04-17 07:55:49 +00:00
Automerger Merge Worker
effb2bc439 Merge "[automerger skipped] Merge "Add a function to process LinkProperties coming from an agent." into rvc-dev am: 448beb4c26 -s ours am: f11e17cac5 -s ours" into rvc-d1-dev-plus-aosp 2020-04-17 07:55:46 +00:00
Lorenzo Colitti
9a326007a1 [automerger skipped] Merge "Add a function to process LinkProperties coming from an agent." into rvc-dev am: 448beb4c26 -s ours am: f11e17cac5 -s ours
am skip reason: Change-Id Ibeeb5f79e8afd3350c935934713d7882f2e0281f with SHA-1 3e586b9676 is in history

Change-Id: Ib7fc14983371f88523d4d0512a3288b69f277bac
2020-04-17 07:55:37 +00:00
Lorenzo Colitti
44eb07abe1 [automerger skipped] Merge "Support changing the NAT64 prefix without removing it." into rvc-dev am: 535d087c23 am: 44f4659cd1 -s ours
am skip reason: Change-Id I789fe9d46d3ac5d074ae697d23013f24a9e0246d with SHA-1 b3e329c4b3 is in history

Change-Id: I9fa685a014e4b0fb4550bd92be524c92a70d826a
2020-04-17 07:55:32 +00:00
Lorenzo Colitti
54700a93d1 [automerger skipped] Merge "Add a function to process LinkProperties coming from an agent." into rvc-dev am: 448beb4c26 am: 158e61cb28 -s ours
am skip reason: Change-Id Ibeeb5f79e8afd3350c935934713d7882f2e0281f with SHA-1 1b6f19d003 is in history

Change-Id: I001da61f217e065b1829663a5ae6aad481ac6b7c
2020-04-17 07:54:59 +00:00
Lorenzo Colitti
44f4659cd1 Merge "Support changing the NAT64 prefix without removing it." into rvc-dev am: 535d087c23
Change-Id: Id40e2345fceb28434ff612267c0fefb57a85898d
2020-04-17 07:28:32 +00:00
Lorenzo Colitti
158e61cb28 Merge "Add a function to process LinkProperties coming from an agent." into rvc-dev am: 448beb4c26
Change-Id: I69373207be56e00686ce0a789c94104e481c00da
2020-04-17 07:28:10 +00:00
Lorenzo Colitti
25e390141b [automerger skipped] Merge "Support changing the NAT64 prefix without removing it." into rvc-dev am: 535d087c23 -s ours
am skip reason: Change-Id I789fe9d46d3ac5d074ae697d23013f24a9e0246d with SHA-1 b3e329c4b3 is in history

Change-Id: If5a81dac82fa47a29db835577eaad0cf706b49ba
2020-04-17 07:27:53 +00:00
Lorenzo Colitti
f11e17cac5 [automerger skipped] Merge "Add a function to process LinkProperties coming from an agent." into rvc-dev am: 448beb4c26 -s ours
am skip reason: Change-Id Ibeeb5f79e8afd3350c935934713d7882f2e0281f with SHA-1 1b6f19d003 is in history

Change-Id: Ie2023ad25b1b0b95c05535a6db824e4c2babda9c
2020-04-17 07:27:30 +00:00
Lorenzo Colitti
535d087c23 Merge "Support changing the NAT64 prefix without removing it." into rvc-dev 2020-04-17 07:26:08 +00:00
Bruce Chen
0167ab8308 Add testTransportTypesEqual to dnsmanager test cases
A test that ensures that NetworkCapabilities.TRANSPORT_* is eaual
to IDnsResolver.TRANSPORT_* for every possible value of each.

Bug: 153267602
Test: atest FrameworksNetTests
Merged-In: I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417
Change-Id: I3dd4ed0d1fcceca9c8aec9b3e6769603e4fa913b
(cherry picked from commit 5f28e6f881e0ea52e8e96c1207654ce44b0d05a1)
2020-04-17 05:25:31 +00:00
Aaron Huang
93259151be Merge changes from topic "cts-networkprovider" am: 767e3a23d2 am: 808c829b15 am: 2999375079 am: 951adbdbf4 am: 1f36c9e009
Change-Id: Ib6f42b8f0e94e8c2715a030587e065864edff25b
2020-04-17 05:11:01 +00:00
Aaron Huang
1f36c9e009 Merge changes from topic "cts-networkprovider" am: 767e3a23d2 am: 808c829b15 am: 2999375079 am: 951adbdbf4
Change-Id: I54b4052e079cef6f13a6e29cf66ddfb26c27d3d4
2020-04-17 04:59:52 +00:00
Aaron Huang
951adbdbf4 Merge changes from topic "cts-networkprovider" am: 767e3a23d2 am: 808c829b15 am: 2999375079
Change-Id: I646b5c4682b6c33973cd3921a0552e895d01f141
2020-04-17 04:46:02 +00:00
Aaron Huang
2999375079 Merge changes from topic "cts-networkprovider" am: 767e3a23d2 am: 808c829b15
Change-Id: I6aed3e0f92d92897239776b568b8074366c2ed3c
2020-04-17 04:44:46 +00:00
Lorenzo Colitti
3e586b9676 Add a function to process LinkProperties coming from an agent.
There are tasks that need to be performed when receiving
LinkProperties directly from a NetworkAgent (either at
registration time or in subsequent updates).

Currently, the only example of such a task is calling
ensureDirectlyConnectedRoutes. This is currently done in
handleUpdateLinkProperties, which is often unnecessary,
because that method iscalled in many other cases than when
receiving properties directly from an agent. Ensuring directly
connected routes only needs to be done when receiving
LinkProperties from the agent, because ConnectivityService does
not directly manipulate routes.

This CL does not do much except remove these superfluous calls
and add the method. A future CL will add more code to the method.

Bug: 150648313
Test: atest ConnectivityServiceTest
Merged-In: Ibeeb5f79e8afd3350c935934713d7882f2e0281f
Change-Id: Ibeeb5f79e8afd3350c935934713d7882f2e0281f
2020-04-17 04:43:06 +00:00
Lorenzo Colitti
e5c66bd083 Support changing the NAT64 prefix without removing it.
This cannot (currently) happen with DNS64 detection, but it can
happen with the PREF64 option.

Bug: 150648313
Test: atest ConnectivityServiceTest Nat464XlatTest --rerun-until-failure 100
Merged-In: I789fe9d46d3ac5d074ae697d23013f24a9e0246d
Change-Id: I789fe9d46d3ac5d074ae697d23013f24a9e0246d
2020-04-17 04:37:26 +00:00