Commit Graph

9783 Commits

Author SHA1 Message Date
Aaron Huang
97d69be928 Merge "Add network agent to enhance NetworkProvider test" am: 147d253956 am: 15a2eae782 am: 4d894c7e58
Change-Id: Ieea40ecca466155a6044ac93544ed6fc5531ef1f
2020-04-20 08:30:29 +00:00
Aaron Huang
4d894c7e58 Merge "Add network agent to enhance NetworkProvider test" am: 147d253956 am: 15a2eae782
Change-Id: I295d001e7b195c523b18b667825a84bb5e862248
2020-04-20 08:11:44 +00:00
Aaron Huang
15a2eae782 Merge "Add network agent to enhance NetworkProvider test" am: 147d253956
Change-Id: Ib1b65aec6398f4e6a1cc2e14ec86d669be88ab74
2020-04-20 07:41:36 +00:00
Aaron Huang
147d253956 Merge "Add network agent to enhance NetworkProvider test" 2020-04-20 07:20:25 +00:00
Aaron Huang
9e5cd58c3f Merge "Move DhcpInfoTest to frameworks/base/tests/net/common" am: e66ba51271 am: 54e05b5d08 am: 07cc052975
Change-Id: I335f03257eb3a0b63c6b35527ff5964d677a8c40
2020-04-17 15:40:16 +00:00
Aaron Huang
07cc052975 Merge "Move DhcpInfoTest to frameworks/base/tests/net/common" am: e66ba51271 am: 54e05b5d08
Change-Id: I7fb30591e0e380f3cf75417bb1d39c81baaaa3f0
2020-04-17 15:18:31 +00:00
Aaron Huang
54e05b5d08 Merge "Move DhcpInfoTest to frameworks/base/tests/net/common" am: e66ba51271
Change-Id: I7179f2e312d1e8237b211cb60eee5c08cd759197
2020-04-17 14:54:34 +00:00
Aaron Huang
7be2e820cc [automerger skipped] Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 78ab633b8f -s ours am: 3472973acb -s ours
am skip reason: Change-Id Ic9809e731aa811a51c2f82d189372169d99a5ed9 with SHA-1 ebbfd3ccb9 is in history

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

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

Change-Id: I581e84d6c3e77d294089c4eccc464073191f341a
2020-04-17 11:01:43 +00:00
Aaron Huang
a01c48d651 Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 78ab633b8f
Change-Id: I2584b86082f224c6fdaa7e4ecc0aac52a92c3427
2020-04-17 11:01:29 +00:00
Aaron Huang
78ab633b8f 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
82948ddb1c 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
Aaron Huang
8d2f514530 Add network agent to enhance NetworkProvider test
Add network agent to test more situation that could get the
onNetworkRequested callback.

Bug: 153614605
Bug: 153613690
Bug: 153612373
Test: atest CtsNetTestCasesLatestSdk:android.net.NetworkProviderTest
Change-Id: Id494a1697cc1b73e8e56ae585a69faec31c59f52
2020-04-17 17:26:07 +08:00
Aaron Huang
b9626ecd40 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
9117323bbf [automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 60afb5ab62 am: 22c40575a1 -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 01950be123 is in history

Change-Id: I4895ee75b1b1143fd4a05f7cc3e6adf20166fa87
2020-04-17 08:45:01 +00:00
Bruce Chen
0083ca58ac [automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 60afb5ab62 -s ours am: a1ba33afea -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 01950be123 is in history

Change-Id: I1b891ee48ce069985de87a0399305cb6339ed7a7
2020-04-17 08:44:40 +00:00
Bruce Chen
22c40575a1 Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 60afb5ab62
Change-Id: I652f7383c805d0f5fc2274a731f8267336da53ec
2020-04-17 08:30:46 +00:00
Bruce Chen
a1ba33afea [automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 60afb5ab62 -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 01950be123 is in history

Change-Id: Idd90cbeb0b95a28e160a3511f7239eefa51b5a92
2020-04-17 08:30:40 +00:00
Bruce Chen
60afb5ab62 Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev 2020-04-17 08:25:23 +00:00
Lorenzo Colitti
bcac17aa68 [automerger skipped] Merge "Support changing the NAT64 prefix without removing it." into rvc-dev am: 6f2a54e75e -s ours am: 5f0041e1a0 -s ours
am skip reason: Change-Id I789fe9d46d3ac5d074ae697d23013f24a9e0246d with SHA-1 aa0c7d00cf is in history

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

Change-Id: Ib7fc14983371f88523d4d0512a3288b69f277bac
2020-04-17 07:55:37 +00:00
Lorenzo Colitti
54750c50cf [automerger skipped] Merge "Support changing the NAT64 prefix without removing it." into rvc-dev am: 6f2a54e75e am: 68b7413eeb -s ours
am skip reason: Change-Id I789fe9d46d3ac5d074ae697d23013f24a9e0246d with SHA-1 7f3d684631 is in history

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

Change-Id: I001da61f217e065b1829663a5ae6aad481ac6b7c
2020-04-17 07:54:59 +00:00
Lorenzo Colitti
68b7413eeb Merge "Support changing the NAT64 prefix without removing it." into rvc-dev am: 6f2a54e75e
Change-Id: Id40e2345fceb28434ff612267c0fefb57a85898d
2020-04-17 07:28:32 +00:00
Lorenzo Colitti
59cdea7585 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
5f0041e1a0 [automerger skipped] Merge "Support changing the NAT64 prefix without removing it." into rvc-dev am: 6f2a54e75e -s ours
am skip reason: Change-Id I789fe9d46d3ac5d074ae697d23013f24a9e0246d with SHA-1 7f3d684631 is in history

Change-Id: If5a81dac82fa47a29db835577eaad0cf706b49ba
2020-04-17 07:27:53 +00:00
Lorenzo Colitti
37852de0bc [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 18a58468c4 is in history

Change-Id: Ie2023ad25b1b0b95c05535a6db824e4c2babda9c
2020-04-17 07:27:30 +00:00
Lorenzo Colitti
6f2a54e75e Merge "Support changing the NAT64 prefix without removing it." into rvc-dev 2020-04-17 07:26:08 +00:00
Bruce Chen
4e54d05cbc 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
3c12c50728 Merge changes from topic "cts-networkprovider" am: ab8282eea7 am: 29d37fd0e9 am: d584fbb66a
Change-Id: I646b5c4682b6c33973cd3921a0552e895d01f141
2020-04-17 04:46:02 +00:00
Aaron Huang
d584fbb66a Merge changes from topic "cts-networkprovider" am: ab8282eea7 am: 29d37fd0e9
Change-Id: I6aed3e0f92d92897239776b568b8074366c2ed3c
2020-04-17 04:44:46 +00:00
Lorenzo Colitti
5559f1edd9 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
aa0c7d00cf 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
Aaron Huang
29d37fd0e9 Merge changes from topic "cts-networkprovider" am: ab8282eea7
Change-Id: I3e86ba642bc86bb25dc45ef65328c014962c95db
2020-04-17 04:22:29 +00:00
Aaron Huang
ab8282eea7 Merge changes from topic "cts-networkprovider"
* changes:
  Add cts test for NetworkProvider
  Adjust permission of NetworkProvider related API
2020-04-17 03:59:47 +00:00
Bruce Chen
416ac948ed Merge "Add testTransportTypesEqual to dnsmanager test cases" am: 0e97073a4d am: fe5c71b37f am: 2bbce4526c
Change-Id: I4d6bfe5809198c006fa89c4d7439c0af1723261c
2020-04-17 03:52:12 +00:00
Bruce Chen
2bbce4526c Merge "Add testTransportTypesEqual to dnsmanager test cases" am: 0e97073a4d am: fe5c71b37f
Change-Id: I0ccca97191773aa77d1c85481d73e0adaf1d0b7a
2020-04-17 03:38:52 +00:00
Bruce Chen
fe5c71b37f Merge "Add testTransportTypesEqual to dnsmanager test cases" am: 0e97073a4d
Change-Id: Idae99c5d19fcffdaf568b79aaa3e1679347ea655
2020-04-17 03:23:18 +00:00
Junyu Lai
1079a9b7bb [automerger skipped] Merge "[SP27.3] Rename TestableNetworkStatsProvider" am: 9151f7c748 am: acaac38457 -s ours am: be13787179 -s ours
am skip reason: Change-Id Ifa8175dc4e2fe2b907ec13b3bd2eca12974f5ea7 with SHA-1 09d50fe69d is in history

Change-Id: I4bb3ceed39ac05828589fd423a3a28c118ab5d7d
2020-04-17 03:06:46 +00:00
Bruce Chen
0e97073a4d Merge "Add testTransportTypesEqual to dnsmanager test cases" 2020-04-17 02:59:15 +00:00
Junyu Lai
be13787179 [automerger skipped] Merge "[SP27.3] Rename TestableNetworkStatsProvider" am: 9151f7c748 am: acaac38457 -s ours
am skip reason: Change-Id Ifa8175dc4e2fe2b907ec13b3bd2eca12974f5ea7 with SHA-1 09d50fe69d is in history

Change-Id: I5e14eec3e2a8af779c04801e9dabaa312db6ae08
2020-04-17 02:49:22 +00:00
Junyu Lai
acaac38457 Merge "[SP27.3] Rename TestableNetworkStatsProvider" am: 9151f7c748
Change-Id: If3f447e3029c3ccb9a21e00257f596dd690ef55a
2020-04-17 02:26:28 +00:00
Junyu Lai
9151f7c748 Merge "[SP27.3] Rename TestableNetworkStatsProvider" 2020-04-17 02:24:55 +00:00
Lorenzo Colitti
be98823fef Merge "Add a function to process LinkProperties coming from an agent." am: 4cba5a3981 am: a77da57421 am: d9f0b86546
Change-Id: I79478ed06ec7b4274512a7e9fa686305230474c4
2020-04-16 16:56:36 +00:00
Lorenzo Colitti
28bf4a853e Merge "Support changing the NAT64 prefix without removing it." am: f09bc1734f am: 3813daab0b am: 32dc5cae3c
Change-Id: I61c2f5c46e4e968ab1777432042b615186829cba
2020-04-16 16:56:20 +00:00
Lorenzo Colitti
d9f0b86546 Merge "Add a function to process LinkProperties coming from an agent." am: 4cba5a3981 am: a77da57421
Change-Id: I66bc26522eb29666424db507437c83e0ab2a0b4d
2020-04-16 16:49:56 +00:00
Lorenzo Colitti
32dc5cae3c Merge "Support changing the NAT64 prefix without removing it." am: f09bc1734f am: 3813daab0b
Change-Id: I19050527eb41a58c7844972f34e92719d2344c27
2020-04-16 16:49:33 +00:00
Lorenzo Colitti
a77da57421 Merge "Add a function to process LinkProperties coming from an agent." am: 4cba5a3981
Change-Id: I7691b297b27065018e79b1808e35f9a02104a150
2020-04-16 16:38:01 +00:00