Commit graph

13,045 commits

Message SHA1
Merge "Correct the logic in NetworkCapabilitiesTest" am: 2848cdf348 am: 06238861b5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649297

Change-Id: I224e3c120ac07677d80396247f5b9e74c1bfd1a4

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-03-23 12:10:57 +00:00
b948cc3ba0
Merge "Add NetworkRequest.Builder creating from an existing instance" am: 08bebe4609 am: eefea38ae5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649294

Change-Id: I96516eb0d976d6e6250d2e96c316c560bfa21ab5

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-03-23 12:09:42 +00:00
5898f562ed
Merge "Correct the logic in NetworkCapabilitiesTest" am: 2848cdf348
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649297

Change-Id: I32bc9ee2db0b192513f782455a91d7336875a039

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-03-23 12:07:47 +00:00
06238861b5
Merge "Correct the logic in NetworkCapabilitiesTest"
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-03-23 11:46:31 +00:00
2848cdf348
Merge "Add NetworkRequest.Builder creating from an existing instance" am: 08bebe4609
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649294

Change-Id: Ib990cb25d50c11b103e248c0c13c584e78aa3450

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-03-23 11:36:07 +00:00
eefea38ae5
Merge "Add NetworkRequest.Builder creating from an existing instance"
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-03-23 10:46:20 +00:00
08bebe4609
Fix cannot find removeUnwantedCapability on R device
Test: atest CtsNetTestCasesLatestSdk:android.net.NetworkCapabilitiesTest
Fix: 183473863
Merged-In: Icf2cda325795acee22a6c634e8d978f64c5ac3cb
Change-Id: Icf2cda325795acee22a6c634e8d978f64c5ac3cb
  (cherry-picked from ag/13966708)

junyulai   commited 2021-03-23 17:40:55 +08:00
1ed0b04410
Use a longer test timeout in integration test
One second to start the test NetworkStack service and obtain
a NetworkMonitor is too tight.

Change-Id: I3ac600276b6248c70c6239b0c9531913dc44096e
Test: atest ConnectivityServiceIntegrationTest

Remi NGUYEN VAN   commited 2021-03-23 09:33:16 +00:00
2c5c322eb9
Correct the logic in NetworkCapabilitiesTest
setOwnerUid() and setAdministratorUids() should run in R+.
Previous logic will skip them in S+. Correct the logic to
what it should be.

Bug: 172183305
Test: atest android.net.NetworkCapabilitiesTest
Change-Id: Ic983aa00f930fb26350469ef093bcba2990433a4

Chiachang Wang   commited 2021-03-23 15:16:39 +08:00
29d00bc32d
Add NetworkRequest.Builder creating from an existing instance
Provide a formal way to construct a new NetworkRequest from an
existing instance. The network capabilities inside the
NetworkRequest is hidden. There is no way to pass a
NetworkRequest and update its capabilities. Add
NetworkRequest.Builder creating from an existing instance to
allow to clone the network capabilities.

Bug: 172183305
Test: make update-api
Change-Id: I068462b2a1410daf67b0c95f2b643d396f079531
Merged-In: I068462b2a1410daf67b0c95f2b643d396f079531

Chiachang Wang   commited 2021-03-23 14:50:03 +08:00
992047ed78
Merge "[VCN15] expose addUnwantedCapability and related APIs" am: 20d187254b am: 4a074bc753
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1639654

Change-Id: I6aee50f7f201361ae29e6442a0d28b79c6dfc1e2

Junyu Lai   authored and   Automerger Merge Worker   commited 2021-03-23 05:51:55 +00:00
aec7499fca
Merge "Have a new method in NetworkAgentConfig.Builder to set allowBypass" am: c643098b0b am: 70e7af26c4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649288

Change-Id: Ifa285f00d08e47877ab73a2eb1cefa3d493024d7

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-03-23 05:51:32 +00:00
bb50fd24b3
Merge "[VCN15] expose addUnwantedCapability and related APIs" am: 20d187254b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1639654

Change-Id: Ie88ff422c473d3891a054fa75b5175b30c10cec9

Junyu Lai   authored and   Automerger Merge Worker   commited 2021-03-23 05:27:53 +00:00
4a074bc753
Merge "Have a new method in NetworkAgentConfig.Builder to set allowBypass" am: c643098b0b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649288

Change-Id: I71d541b3578169410349356a149528954e1c8789

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-03-23 05:18:03 +00:00
70e7af26c4
Merge "[VCN15] expose addUnwantedCapability and related APIs"
Junyu Lai   authored and   Gerrit Code Review   commited 2021-03-23 05:02:22 +00:00
20d187254b
Merge "Have a new method in NetworkAgentConfig.Builder to set allowBypass"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2021-03-23 04:40:50 +00:00
c643098b0b
Merge changes I638ed5cd,I29f15571,I21a22ed1 am: 71996469d2 am: 068f44831d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1648068

Change-Id: Ia0b6ffa74536e3f20f13282d08bd858fc9e979bf

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-03-23 02:10:45 +00:00
12b8bb5c19
Merge changes I638ed5cd,I29f15571,I21a22ed1 am: 71996469d2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1648068

Change-Id: I74e0c3eae3bf22c9a05968e2daf5b59da33f01bb

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-03-23 01:37:03 +00:00
068f44831d
Merge changes I638ed5cd,I29f15571,I21a22ed1
* changes:
  Expose registerDefaultNetworkCallbackAsUid.
  Support calling registerDefaultNetworkCallback for another UID.
  Store the effective UID in NetworkRequestInfo.

Lorenzo Colitti   authored and   Gerrit Code Review   commited 2021-03-23 01:27:58 +00:00
71996469d2
Have a new method in NetworkAgentConfig.Builder to set allowBypass
Have a new method in NetworkAgentConfig.Builder for Vpn to set
allowBypass.

Bug: 182963397
Test: m
Change-Id: I3f244464438325ee7f8a1b953d3fb28186293628

lucaslin   authored and   Lorenzo Colitti   commited 2021-03-23 09:01:40 +09:00
c276e2bb77
[automerger skipped] Expose uids related APIs in NetworkRequest and NetworkCapabilities am: fd13f9223f -s ours
am skip reason: skip tag Change-Id If76877e6bde7abe3b5ddde078f87eefd027e675c with SHA-1 b40480c2ea is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13946380

Change-Id: I1072a17b5977b5c2c4fdb8e04c59298c59c0d3c3

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-03-22 19:12:39 +00:00
712d3a0579
[automerger skipped] Replace the usage of UidRange am: e0ace0533c -s ours
am skip reason: skip tag Change-Id Idb7f353788c5779a4fbbd107595e9326b99fe0a8 with SHA-1 c347b9c341 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13946379

Change-Id: I3e7a0c612ee4ca37bf5567d5ec1297cf14671337

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-03-22 19:12:32 +00:00
9421da680e
Expose uids related APIs in NetworkRequest and NetworkCapabilities
NetworkRequest is moving into the incoming connectivity mainline
module. The hidden setUids becomes inaccessible outside the
module. Shims for support cts in different API levels will need
to use it to verify the behavior of NetworkRequest. Thus, expose
it to the API surface.

Also, VPN uses getUids and setUids to control network
capabilities. Networkcapabilities is a part of incoming
connectivity mainline module but VPN is not. Thus, exposing these
two methods are needed to allow VPN to continue using it.

Test: make update-api
Bug: 172183305
Merged-In: I107c329d4d7130d488772166eae8b5e7aaa2ff04
Merged-In: If76877e6bde7abe3b5ddde078f87eefd027e675c
Change-Id: If76877e6bde7abe3b5ddde078f87eefd027e675c

Chiachang Wang   authored and   Lorenzo Colitti   commited 2021-03-23 01:34:54 +09:00
fd13f9223f
Expose uids related APIs in NetworkRequest and NetworkCapabilities
NetworkRequest is moving into the incoming connectivity mainline
module. The hidden setUids becomes inaccessible outside the
module. Shims for support cts in different API levels will need
to use it to verify the behavior of NetworkRequest. Thus, expose
it to the API surface.

Also, VPN uses getUids and setUids to control network
capabilities. Networkcapabilities is a part of incoming
connectivity mainline module but VPN is not. Thus, exposing these
two methods are needed to allow VPN to continue using it.

Test: make update-api
Bug: 172183305
Merged-In: I107c329d4d7130d488772166eae8b5e7aaa2ff04
Change-Id: If76877e6bde7abe3b5ddde078f87eefd027e675c

Chiachang Wang   authored and   Lorenzo Colitti   commited 2021-03-23 01:33:16 +09:00
b40480c2ea
Replace the usage of UidRange
UidRange is used in a shared way between ConnectivityService
and VPN through the use of NetworkCapabilities. UidRange will
be part of the ConnectivityService mainline but Vpn.java will
stay in the framework. We need a way to replace the APIs using
UidRange, or to make UidRange system API. The only really
relevant surface here is NetworkCapabilities#{setUids, getUids}.
The need for UidRange could be replaced by an integer Range, so
replace the usage of UidRange by a integer Range in
NetworkCapabilities#{setUids, getUids} and update the relevant
callers.

Bug: 172183305
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Merged-In: I4e5aec6ef1ea02e038fcd7ed117a3b67b69c5cb9
Merged-In: Idb7f353788c5779a4fbbd107595e9326b99fe0a8
Change-Id: Idb7f353788c5779a4fbbd107595e9326b99fe0a8

Chiachang Wang   authored and   Lorenzo Colitti   commited 2021-03-23 01:11:20 +09:00
e0ace0533c
Replace the usage of UidRange
UidRange is used in a shared way between ConnectivityService
and VPN through the use of NetworkCapabilities. UidRange will
be part of the ConnectivityService mainline but Vpn.java will
stay in the framework. We need a way to replace the APIs using
UidRange, or to make UidRange system API. The only really
relevant surface here is NetworkCapabilities#{setUids, getUids}.
The need for UidRange could be replaced by an integer Range, so
replace the usage of UidRange by a integer Range in
NetworkCapabilities#{setUids, getUids} and update the relevant
callers.

Bug: 172183305
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Merged-In: I4e5aec6ef1ea02e038fcd7ed117a3b67b69c5cb9
Change-Id: Idb7f353788c5779a4fbbd107595e9326b99fe0a8

Chiachang Wang   authored and   Lorenzo Colitti   commited 2021-03-23 01:02:00 +09:00
c347b9c341
Merge changes I90bf7957,If58524b0 am: 029ba17cb0 am: c3e38ade53
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646972

Change-Id: I13d23ef04c694527a4440f6bed21699684ec7424

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-03-22 11:01:50 +00:00
b08e5aba25
Expose registerDefaultNetworkCallbackAsUid.
Bug: 165835257
Test: atest FrameworksNetTests
Change-Id: I638ed5cd5273d456919630aba1e22f099df1b36c

Lorenzo Colitti   commited 2021-03-22 19:50:27 +09:00
3949d6ed96
Merge changes I90bf7957,If58524b0 am: 029ba17cb0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646972

Change-Id: I1c3de9d738a294e9d21314de84384fa89745285d

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-03-22 10:17:37 +00:00
c3e38ade53
Merge changes I90bf7957,If58524b0
* changes:
  Fix privileged apps calling registerDefaultNetworkCallback.
  Test a bug with NETWORK_SETTINGS+registerDefaultNetworkCallback.

Lorenzo Colitti   authored and   Gerrit Code Review   commited 2021-03-22 09:43:53 +00:00
029ba17cb0
Support calling registerDefaultNetworkCallback for another UID.
This is to be used by privileged components (e.g., JobScheduler)
to request callbacks about the state of other UIDs on the system.

Bug: 165835257
Test: new unit test coverage
Change-Id: I29f155710394e58c14fcef488db6271d8d83033a

Lorenzo Colitti   commited 2021-03-22 17:52:20 +09:00
b199b960c7
[VCN15] expose addUnwantedCapability and related APIs
Test: m -j doc-comment-check-docs
Bug: 175662146
Merged-In: I3f2e6a99e015f09cc4405f6804eac4ae33e3dcc7
Change-Id: I3f2e6a99e015f09cc4405f6804eac4ae33e3dcc7
  (cherry-picked from ag/13929102)

junyulai   commited 2021-03-22 16:51:50 +08:00
767c9f26de
[automerger skipped] Merge "Revert "Correct the logic in NetworkCapabilitiesTest"" am: 3f603fae13 -s ours am: 60450deb67
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645005

Change-Id: Ifa4c6a30dfec86d8860c365b3f4b343599ab3524

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-03-22 07:37:17 +00:00
7007e04119
[automerger skipped] Merge "Correct the logic in NetworkCapabilitiesTest" am: 58f4cdf3b3 -s ours am: 8297bc95a0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640144

Change-Id: I553b1c59e6a35c8e8a0ac7dc59d2367bffa1f39d

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-03-22 07:37:02 +00:00
d914ad7ad9
[automerger skipped] Merge "Revert "Correct the logic in NetworkCapabilitiesTest"" am: 3f603fae13 -s ours
am skip reason: skipped by user chiachangwang

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645005

Change-Id: Ib56fafd17dc88b9ded6cd39501a3bfa4cf5fe1b5

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-03-22 07:17:25 +00:00
60450deb67
[automerger skipped] Merge "Correct the logic in NetworkCapabilitiesTest" am: 58f4cdf3b3 -s ours
am skip reason: skipped by user chiachangwang

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640144

Change-Id: Ib61e9100ff497a22a900aa13a83027242ddddecb

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-03-22 06:55:09 +00:00
8297bc95a0
Merge "Revert "Correct the logic in NetworkCapabilitiesTest""
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-03-22 06:26:33 +00:00
3f603fae13
Revert "Correct the logic in NetworkCapabilitiesTest"
This reverts commit 628ada1d2d.

Reason for revert: <Merge abnormal in automerger>

Change-Id: I0cdb401f4962050bf24dc9d9871d4ef15cf52629

Chiachang Wang   commited 2021-03-22 06:15:02 +00:00
f2b0b41764
Store the effective UID in NetworkRequestInfo.
This is necessary for privileged components such as
JobScheduler to file NetworkCallbacks on behalf of other
UIDs.

This CL adds the field to NetworkRequestInfo and updates some
of the matching code, but does not set the field to anything
other than the UID that created the request. Thus, it should
cause no behaviour changes.

Bug: 165835257
Test: refactoring with no change in behaviour, passes existing tests
Change-Id: I21a22ed1b851b8511d36f5202c9eac03e7158d3d

Lorenzo Colitti   commited 2021-03-22 14:52:38 +09:00
f2514125b6
Merge "Remove Preconditions usage in TestNetworkSpecifier" am: afdb6a7347 am: 6a4a9423ef
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644991

Change-Id: Id66ea1eda381be3b42a3ccf553d831d49b5fb7b7

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-22 04:01:28 +00:00
8b4738d3b3
Merge "Revert "Revert "Remove connectivity dependency on Preconditions""" am: aa1d743312 am: 5024171a1f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635319

Change-Id: Id6fa989fa1d24261d29ab61d0a666cc6a33dc7b8

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-22 04:01:01 +00:00
e6fb8c44dd
Merge "Add TEST_MAPPING for Connectivity" am: b2fe416e82 am: 1a7066d0a5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646851

Change-Id: I8ee539eb915c0f0aaab509fb7eb170af4d9c4b5c

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-22 04:00:11 +00:00
0847f57ff9
Merge "Move trimV4AddrZeros to libs/net" am: 33b1df7ec4 am: dea1480c0b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1636022

Change-Id: Ib2e695f5418c8dfb17f8e96c9e465efdc822cc48

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-03-22 03:59:30 +00:00
4345a9b287
Merge "Add SystemMessages protos to Connectivity" am: cf638d345b am: 02e5fcf301
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1626204

Change-Id: Icba10b315bd45512a2de8d8d22c3e7451a2365c0

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-22 03:58:38 +00:00
3b780f79d3
Merge "Swap parameters in QosCallback#registerQosCallback" am: fce4049a1d am: f3f342370a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628901

Change-Id: I2bf2b8a3eccf7dab7ac22efd9a444dbaa67faa79

Jayachandran Chinnakkannu   authored and   Automerger Merge Worker   commited 2021-03-22 03:58:17 +00:00
61bfb06808
resolve merge conflicts of d2c4f1d6c8 to stage-aosp-master am: 39ff19da2f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13944446

Change-Id: Ia4f30adab268c9c51d89d61355a48da00b855190

Roshan Pius   authored and   Automerger Merge Worker   commited 2021-03-22 03:55:23 +00:00
c8ed8dce59
Merge "Remove Preconditions usage in TestNetworkSpecifier" am: afdb6a7347
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644991

Change-Id: Ifca29ba189f58655b0229467e2d86b0b6426b2d1

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-22 03:32:31 +00:00
6a4a9423ef
Merge "Revert "Revert "Remove connectivity dependency on Preconditions""" am: aa1d743312
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635319

Change-Id: I0a933c31e05428526a5c6fb4ef694f7c4cf818bb

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-22 03:29:41 +00:00
5024171a1f
Merge "Add TEST_MAPPING for Connectivity" am: b2fe416e82
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646851

Change-Id: I829c839620849e3a49be0f2629157f4adb9a1dcb

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-22 03:26:46 +00:00
1a7066d0a5
Merge "Move trimV4AddrZeros to libs/net" am: 33b1df7ec4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1636022

Change-Id: Ifbad5630a39f8990479a5f20e018a3a499334fe1

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-03-22 03:23:48 +00:00
dea1480c0b