Commit graph

13,045 commits

Message SHA1
Merge "Add @Nullable to Object#equals()" am: 009f021811 am: 2a61f079a8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1574815

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7d13a249fabc93baaa0d01de3f9c6cec7ddd11e4

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-02-05 10:20:50 +00:00
7113304b38
Merge "[VCN09] Rename linger timer" am: 5ae251610d am: 7604c69dff
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1571902

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2290180e6891e9f568140ecf9e79dd9b237e06bd

Junyu Lai   authored and   Automerger Merge Worker   commited 2021-02-05 10:20:27 +00:00
ea671ec39e
Merge "Remove legacy network factories" am: e035041e55 am: a18ae04565
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1574684

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If74d226cc09ea1f1b1a70423084fbd018dba2e63

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-02-05 10:20:00 +00:00
aee39eb58d
Merge "Add @Nullable to Object#equals()" am: 009f021811
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1574815

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I523eb00d30bfedeb6e7533a94868016171846a59

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-02-05 10:01:23 +00:00
2a61f079a8
Merge "[VCN09] Rename linger timer" am: 5ae251610d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1571902

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0b69d6ac4d273b836c5ce36c79fc3ebb6c964634

Junyu Lai   authored and   Automerger Merge Worker   commited 2021-02-05 09:40:31 +00:00
7604c69dff
Merge "Add @Nullable to Object#equals()"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-02-05 09:36:41 +00:00
009f021811
Merge "[VCN09] Rename linger timer"
Junyu Lai   authored and   Gerrit Code Review   commited 2021-02-05 09:29:12 +00:00
5ae251610d
Merge "Remove legacy network factories" am: e035041e55
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1574684

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I747f6352eb08589c00e77915eb17640e1d5f0ee1

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-02-05 09:23:44 +00:00
a18ae04565
Merge changes Ieb7f33bc,I81b56862 am: df7233f8e1 am: 92860eb233
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1570920

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ieb68b5e1c2a3d653af675bae227bf8a5e3a4d72e

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-02-05 08:55:22 +00:00
90cf1ed3f7
Merge "Remove legacy network factories"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2021-02-05 08:23:19 +00:00
e035041e55
[VCN09] Rename linger timer
Linger timer mechanism will be used for both "linger" and
"nascent" states. To prevent confusion, rename the linger
timer and related functions to more generic name.

Test: TH
Bug: 175180558
Change-Id: I652f7c65c2f8bc58fb9d3316480f23a9709eccce

junyulai   commited 2021-02-05 15:57:07 +08:00
2a4f006f30
Merge changes Ieb7f33bc,I81b56862 am: df7233f8e1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1570920

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie0ef06663c31dfe16e0000410c9785ede9369212

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-02-05 07:54:40 +00:00
92860eb233
Merge "Replace NPMI#isUidNetworkingBlocked()" am: 9113cf2872 am: c48b6bb362
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536313

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5c9f22befc69af4b4dc796d7fb432314cf8e3c3f

Paul Hu   authored and   Automerger Merge Worker   commited 2021-02-05 07:43:12 +00:00
b3cd3bb875
Merge changes Ieb7f33bc,I81b56862
* changes:
  Fix the legacy VPN tests that start racoon.
  Make testLegacyLockdownVpn more realistic.

Lorenzo Colitti   authored and   Gerrit Code Review   commited 2021-02-05 07:34:43 +00:00
df7233f8e1
Add @Nullable to Object#equals()
This is a partial cherry-pick of change:
I5eedb571c9d78862115dfdc5dae1cf2a35343580

for connectivity classes.

Bug: 170883422
Test: m
Merged-In: I5eedb571c9d78862115dfdc5dae1cf2a35343580
Change-Id: I7dc661863b73f4198ddb4f3a1566583d0f07db3c

Roman Kalukiewicz   authored and   Remi NGUYEN VAN   commited 2021-02-05 07:28:44 +00:00
1f69a5e261
Merge "Replace NPMI#isUidNetworkingBlocked()" am: 9113cf2872
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536313

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6c4b745fa67c8db72d04eb48582d06916f58902d

Paul Hu   authored and   Automerger Merge Worker   commited 2021-02-05 07:01:42 +00:00
c48b6bb362
Merge "Replace NPMI#isUidNetworkingBlocked()"
Paul Hu   authored and   Gerrit Code Review   commited 2021-02-05 06:38:02 +00:00
9113cf2872
Fix the legacy VPN tests that start racoon.
These tests do not actually work, or at least not as designed.
What happens when they are run is that creating/connecting the
VPN throws an exception. The call to legacyRunnerReady.block()
times out after 10 seconds because the condition variable is
never opened, but the doesn't notice the timeout becasue it
doesn't check the return value of block().

There are two reasons for the VPN not coming up.
1. VpnConfig.getIntentForStatusPanel calls into PendingIntent and
   ActivityManager statics, which bypass all the mocks and fail
   with an appops denial. Fix this by making it a dependency.
2. The tests are broken due to the UserManager API changes
   tracked in b/175883995. Fixing by adding a bit of ad-hoc code
   into startLegacyVpn, with a TODO to delete it once the rest of
   the UserManager setup code is fixed.

Fix these and check the return value of block(). This ensures
that if any other breakage is added the test will actually fail.
Also check that the throw route survives all the way to the
LinkProperties sent to the agent.

Bug: 173331190
Test: atest com.android.server.connectivity.VpnTest
Change-Id: Ieb7f33bce283ac5ee562a912df8edb9c930ed2b0

Lorenzo Colitti   commited 2021-02-05 14:40:13 +09:00
f5a4ac9592
Make testLegacyLockdownVpn more realistic.
Bug: 173331190
Test: test-only change
Change-Id: I81b5686244f479d967c826e29eba4feb396a09cf

Lorenzo Colitti   commited 2021-02-05 14:36:54 +09:00
3a2a0a31f4
Merge changes Ic41fdc40,I5851a36e am: 34989a9c9e am: f6689c9541
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566351

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6d16914403745fe0a1421423667ad3a7cd00a4e5

James Mattis   authored and   Automerger Merge Worker   commited 2021-02-05 04:36:08 +00:00
1d21632a3a
Stubbed setOemNetworkPreference in Connectivity
Stubbed setOemNetworkPreference() in ConnectivityService and connected
it to ConnectivityManager.

Bug: 176495254
Bug: 176494815
Test: atest FrameworksNetTests
atest FrameworksNetIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: Iabad7300a8b058e1edcb0defab8a031d21e6433c

James Mattis   commited 2021-02-04 20:12:40 -08:00
ed87a67c80
Update OemNetworkPreferences to use 1:1 Map
Updated OemNetworkPreferences to use a Map instead of an Array of Arrays
(SparseArray<List<String>>). This is for two reasons: to make the API
simpler and also prevent issues with duplicate entries for packages
mapped to more than one preference which is not supported.

Bug: 176597181
Bug: 176494815
Test: atest FrameworksNetTests
Change-Id: I85363e28b46b89ae60a85219313c2a45bd5e7dd5

James Mattis   commited 2021-02-04 20:12:40 -08:00
c1af7f03e4
Merge changes Ic41fdc40,I5851a36e am: 34989a9c9e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566351

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id949051a7aa834be339530f5db6cdd36ec2ea7f2

James Mattis   authored and   Automerger Merge Worker   commited 2021-02-05 03:49:50 +00:00
f6689c9541
Create new system API in UserHandle to get uid
For the incoming connectivity mainline, it need to compute the
intersection of a set of uids and appIds for the permission
control. As @UserIdInt values are internal implementation details
of the OS, any mainline modules should use strongly-typed
UserHandle arguments. Thus, create a new API that accepts
UserHandle and appId to get the computed uid.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I046546d2c5c76eac7a251e63e4234776975bf2bc

Chiachang Wang   commited 2021-02-05 02:26:23 +00:00
a982253985
Updating Existing CS APIs for multiple defaults
Updating existing ConnectivityService APIs to support multiple default
network functionality.

Bug: 178729499
Bug: 172347841
Test: atest FrameworksNetTests
atest NetworkStackTests
atest FrameworksNetIntegrationTests
atest NetworkStackIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: Ic41fdc402a26809efda71f484c259ffd7a52e63b

James Mattis   commited 2021-02-04 15:54:18 -08:00
f61f7be217
Transmitting multiple default networks to netd
Updating ConnectivityService to transmit network information to netd as
part of supporting multiple default networks.

Bug: 176191930
Bug: 172347841
Test: atest FrameworksNetTests
atest NetworkStackTests
atest FrameworksNetIntegrationTests
atest NetworkStackIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: I5851a36e3c3ccb45f4cb3ff85e0fc1352f64dc70

James Mattis   commited 2021-02-04 15:41:25 -08:00
1238af2a5c
[Mainline] Core Platform APIs migration
* java/net/InetAddress;->parseNumericAddress(Ljava/lang/String;)Ljava/net/InetAddress;
* libcore/io/IoUtils;->closeQuietly(Ljava/io/FileDescriptor;)V
* libcore/io/IoUtils;->closeQuietly(Ljava/lang/AutoCloseable;)V
* libcore/io/IoUtils;->setBlocking(Ljava/io/FileDescriptor;Z)V
* java/net/Inet4Address;->ANY:Ljava/net/InetAddress;
* java/net/Inet6Address;->ANY:Ljava/net/InetAddress;

Bug: 177260833
Test: mma
Change-Id: Iaddf1e9d912208b3982faea90aaa0fda80d9420a

Serik Beketayev   commited 2021-02-04 15:38:24 -08:00
e5e58d195b
Merge changes from topic "nullablecollection" am: 0a5c421c92 am: 43e0944217
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1567165

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia6baaacb15e7575f837da727ecbe6643dd93dfb4

Adrian Roos   authored and   Automerger Merge Worker   commited 2021-02-04 16:49:05 +00:00
db20faabe8
API: Suppress existing NullableCollections lints am: 14c08d26d5 am: 015da1beca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566096

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I931b4ec091173789f480ecc761044a27944c4b85

Adrian Roos   authored and   Automerger Merge Worker   commited 2021-02-04 16:49:00 +00:00
47136c15e6
Merge changes from topic "nullablecollection" am: 0a5c421c92
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1567165

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I754de2bd3b24e9027d6cf9776ea93e611a8e42c7

Adrian Roos   authored and   Automerger Merge Worker   commited 2021-02-04 16:23:43 +00:00
43e0944217
API: Suppress existing NullableCollections lints am: 14c08d26d5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566096

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2d47151b7e26e82706f2d94a13c4067fe71fc168

Adrian Roos   authored and   Automerger Merge Worker   commited 2021-02-04 16:19:34 +00:00
015da1beca
Merge changes from topic "nullablecollection"
* changes:
  API: Suppress existing NullableCollections lints (TaskOrganizer)
  API: Suppress existing NullableCollections lints

Adrian Roos   authored and   Gerrit Code Review   commited 2021-02-04 15:53:34 +00:00
0a5c421c92
Replace NPMI#isUidNetworkingBlocked()
ConnectivityService is going to become a mainline module which
will not able to access hidden APIs. NetworkPolicyManagerInternal
is a internal serivce that CS can't be access after be a mainline
module. Thus, create NPM#checkUidNetworkingBlocked to replace it.

Bug: 170598012
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases
Test: atest CtsHostsideNetworkTests
Test: atest FrameworksCoreTests:NetworkPolicyManagerTest
Test: atest FrameworksServicesTests:NetworkPolicyManagerServiceTest
Change-Id: I7bee37522dc5c55c255b159fda9481eff663655a

paulhu   commited 2021-02-04 19:28:57 +08:00
97114c99b4
Update VpnTest for new restricted API
This patch addressses the mocked UserManager for the context
of the user which is created by createContextAsUser.

Bug: 171529940
Bug: 175883995
Test: FrameworksNetTests
Change-Id: Ie72d08c765ed7fb7083c0c4b7ee02a43c23d1707

Aaron Huang   commited 2021-02-04 19:14:57 +08:00
a8a74f1988
Merge "Revert the fallback naming into default network" am: 068b629dfe am: 74126b9bb0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1574083

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifde71b5b364c03fde902021ad7371d139677fdb1

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-02-04 09:48:16 +00:00
4e42931c64
Merge "Improve getConnectionOwnerUid tests." am: bd2f639a30 am: aa7644c9f9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1572980

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I82e9db5a466e6a40eaa92dfe45ed29447641d8e5

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-02-04 09:48:08 +00:00
42f099f5c2
Merge "Revert the fallback naming into default network" am: 068b629dfe
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1574083

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I23ab54858d6b7f78a51fccb1c8dcfdf1983c572e

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-02-04 09:15:55 +00:00
74126b9bb0
Merge "Improve getConnectionOwnerUid tests." am: bd2f639a30
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1572980

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I28b29f3acbc253e80bfe756ed67e48e4ce81af90

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-02-04 09:09:50 +00:00
aa7644c9f9
[VCN07] Bypass VCN for non-internet app accessible cellular services
Deduce the NET_CAPABILITY_NOT_VCN_MANAGED capability from other
capabilities and user intention, which includes:
   1. For the requests that don't have anything besides
      VCN_SUPPORTED_CAPABILITIES, add the NOT_VCN_MANAGED to
      allow the callers automatically utilize VCN networks
      if available.
   2. For the requests that explicitly add or remove
      NOT_VCN_MANAGED,  do not alter them to allow user fire
      request that suits their need.

Test: atest NetworkRequestTest#testBypassingVcnForNonInternetRequest
Bug: 175662146
Change-Id: I9936894b9530a22fb186cfd25cbee0fced65b72b

junyulai   commited 2021-02-04 17:07:23 +08:00
1243a00669
Remove legacy network factories
Nothing on the system is using registerNetworkFactory,
unregisterNetworkFactory at the moment.

registerNetworkFactory, unregisterNetworkFactory are protected by
signature permissions, so could not be used by anything outside of the
system.

Remove the two methods and the underlying support for this legacy,
deprecated mechanism.

Bug: 179229316
Test: atest FrameworksNetTests
Change-Id: I7cdc9eed67f846c8774474af038133040aeccab3

Remi NGUYEN VAN   commited 2021-02-04 18:04:43 +09:00
773d918ade
Merge "Revert the fallback naming into default network"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-02-04 08:48:21 +00:00
068b629dfe
Merge "Improve getConnectionOwnerUid tests."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2021-02-04 08:22:03 +00:00
bd2f639a30
Merge "Reimplement [read|write]ArraySet of Parcel inside NetworkCapabilities" am: 0cbefc17d4 am: d6a7663703
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556547

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9f337c1439d757dea60e91c8b182c3eb77633030

Lucas Lin   authored and   Automerger Merge Worker   commited 2021-02-04 07:46:57 +00:00
9cb2e8564b
[automerger skipped] Merge changes I6ec246a6,If7eb8857,Id3d12b23,Ia52f9caf,I21028457, ... into rvc-qpr-dev am: 82c672dff6 -s ours
am skip reason: Change-Id I6ec246a6a4e61f634956a165797fbb80296efd6a with SHA-1 246d176689 is in history

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I053b05625069920a308a0ec96cf34641644beffe

TreeHugger Robot   authored and   Automerger Merge Worker   commited 2021-02-04 07:45:47 +00:00
309742f110
Merge "Reimplement [read|write]ArraySet of Parcel inside NetworkCapabilities" am: 0cbefc17d4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556547

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2a6774b8a1a029dbe34fe7aa8a4af3d94bdc0bb4

Lucas Lin   authored and   Automerger Merge Worker   commited 2021-02-04 06:52:05 +00:00
d6a7663703
Merge "Reimplement [read|write]ArraySet of Parcel inside NetworkCapabilities"
Lucas Lin   authored and   Gerrit Code Review   commited 2021-02-04 06:12:14 +00:00
0cbefc17d4
[Mainline] Migrate android.utils package items
Bug: 177696419
Test: mma
Change-Id: Iaf99140d6153c1fe6674f6bf6077d54f1c8a20e9

Serik Beketayev   commited 2021-02-03 20:55:11 -08:00
64cea8cf37
Improve getConnectionOwnerUid tests.
Currently, the tests only check whether the method throws a
SecurityException or not. Also check the return value of the
call, by mocking out InetDiagMessage.getConnectionOwnerUid.

This is required to test an upcoming change that will never
throw SecurityException but always return INVALID_UID if the
caller lacks permissions.

Bug: 173331190
Test: test-only change
Change-Id: I63f42a2f098fcf8796c9b4525a3a7b8320c0a139

Lorenzo Colitti   commited 2021-02-04 04:19:28 +00:00
dbcd5d632a
Revert the fallback naming into default network
There is strong opposition in the team to this rename.
Reverting to the old language.

Test: FrameworksNetTests
Change-Id: Icefa3090966c07fd66692ddd5b44dfc94485a914

Chalard Jean   commited 2021-02-04 13:14:05 +09:00
1bc77a99e3
Merge changes Ifa2aa335,I09366a7f am: 7fed667205 am: 1700ac64d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1565201

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I75892e729ba690205bea14512edef97d271611f0

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-02-03 15:54:14 +00:00
61074fe878