Commit Graph

14074 Commits

Author SHA1 Message Date
Roshan Pius
fd994c97a2 [automerger skipped] resolve merge conflicts of d2c4f1d6c8 to stage-aosp-master am: 39ff19da2f am: c8ed8dce59 -s ours
am skip reason: skip tag Change-Id Ib9d7923104ac0a60f6af5a3a2d2b7f13bc0262e3 with SHA-1 332e7a241a is already in history

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

Change-Id: I945ee90092cf1f8001a92b72a66373d92fbcd326
2021-03-22 12:28:37 +00:00
Chiachang Wang
56294457bd [automerger skipped] Revert "Revert "Expose uids related APIs in NetworkRequest and N..." am: 8d81c8d76b -s ours am: 9991401b9d -s ours am: 7d909af3bb -s ours
am skip reason: skip tag Change-Id I107c329d4d7130d488772166eae8b5e7aaa2ff04 with SHA-1 6f96bb4b34 is already in history

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

Change-Id: I9986ddce8827a85982b0846e18044fc45ec95c24
2021-03-22 12:28:01 +00:00
Lorenzo Colitti
03f2900d0a [automerger skipped] Merge changes from topic "backport-connectivityresources" am: a31a7b1bf4 am: dd37a5d576 am: a043655e3a -s ours
am skip reason: skip tag Change-Id Ic0d24d36af0b87153d527083f8964ddc6cd78482 with SHA-1 9d239b5515 is already in history

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

Change-Id: Ie24e96154851ddeac6971e4bfa49a0eb43e5915c
2021-03-22 12:27:31 +00:00
Lorenzo Colitti
b28d29738c [automerger skipped] Cherry-pick some test changes from ag/13210542. am: e7963a1d82 am: eb0dc8f775 am: 28a89348a9 -s ours
am skip reason: skip tag Change-Id I35d28c8df341dbbac2774026c6ca749e296c0482 with SHA-1 3aa6043c46 is already in history

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

Change-Id: I886ca8978862d2dacc11d2bd5d4977698e953935
2021-03-22 12:27:21 +00:00
Remi NGUYEN VAN
530bffa889 [automerger skipped] Add connectivity protos to framework-connectivity am: 953819d7f0 am: 00b56b8d0d am: 30c4960d7e -s ours
am skip reason: skip tag Change-Id I2c4a37ff2ee9e8efde49885feeafa27dcff7ca2c with SHA-1 d2f03002c9 is already in history

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

Change-Id: I593f9d014d29a8041c9acbe1f3034f15613c88b5
2021-03-22 12:27:12 +00:00
paulhu
a98994a3f5 [automerger skipped] Remove unused NetworkPolicyManagerInternal in CS am: c850635440 am: 143739703d am: 634e8a5b2a -s ours
am skip reason: skip tag Change-Id I8719ef2e96e7db9da2894b467b9e7a1bc09de386 with SHA-1 d97c467e2a is already in history

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

Change-Id: I3bfe4457a7b9f3a0b7f2f3604f0f1745c96cb7bb
2021-03-22 12:26:52 +00:00
Remi NGUYEN VAN
fbc44046d9 [automerger skipped] Move connectivity AIDLs to android.net am: 6ed4472b63 am: e6fe8b4103 am: 909eb08445 -s ours
am skip reason: skip tag Change-Id I611f1941698c574e37aea912ee76dadc8b32e41a with SHA-1 8ffe4eb5e3 is already in history

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

Change-Id: Ice5060b366cfb6cbce6e6151f2fb1a1208e9b939
2021-03-22 12:26:41 +00:00
Remi NGUYEN VAN
18c08a91be [automerger skipped] Migrate framework-connectivity internal resources am: 8e12782094 am: 1f00de9e81 am: 50fab6449d -s ours
am skip reason: skip tag Change-Id I77a3efca2cd644f9828db1ed5d3cae8070fb8363 with SHA-1 4d49a1922a is already in history

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

Change-Id: I17ffd47283c43a6df1e61ca9ef864ca32d99e4e9
2021-03-22 12:26:31 +00:00
Remi NGUYEN VAN
7e85f08312 [automerger skipped] Add multipath preference, background status API am: 0f91b7a19a am: 6f3429172b am: 3f139e72f6 -s ours
am skip reason: skip tag Change-Id I8a03162b2f6691086bb64e75ffd354cdfca7f86a with SHA-1 92f20605d8 is already in history

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

Change-Id: I147c04bb30ed920679d88cd765b7517ca4fbd12e
2021-03-22 12:26:13 +00:00
Lorenzo Colitti
2c5b333737 [automerger skipped] Merge "Copy NetworkNotificationManager resources to conectivity module." am: 4385ef6896 am: cc018f77ec am: db1ad4da2b -s ours
am skip reason: skip tag Change-Id I99c0d28069dd1a13d452105b0a83a03a833232a2 with SHA-1 3b8af467a8 is already in history

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

Change-Id: I97d82338363702be56963839a241e1d72c1e9c86
2021-03-22 11:00:35 +00:00
Lucas Lin
def33143e8 Merge "Remove the usage of NETID_UNSET from Vpn.java" into sc-dev 2021-03-22 09:38:26 +00:00
Remi NGUYEN VAN
a12c9fa7cf Merge "Add NetworkFactory to connectivity jarjar rules" into sc-dev 2021-03-22 09:27:06 +00:00
lucaslin
865b4f2ade Remove the usage of NETID_UNSET from Vpn.java
Modify Vpn#getNetId() to Vpn#getNetwork() and uses NETID_UNSET
when getNetwork() returns null in ConnectivityServiceTest.

Bug: 182963397
Test: atest FrameworksNetTests
Change-Id: I69d449705b1dc541287c72af8dc7705dc4733109
2021-03-22 08:29:18 +00:00
Lucas Lin
2ad15eca0c Merge "Expose some APIs from ConnectivityManager" into sc-dev 2021-03-22 06:44:49 +00:00
Roshan Pius
c8ed8dce59 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
2021-03-22 03:55:23 +00:00
lucaslin
5140e48a49 Expose some APIs from ConnectivityManager
- Expose setRequireVpnForUids to Vpn.java
- Expose setLegacyLockdownVpnEnabled to LockdownVpnTracker.java
- Expose requestRouteToHostAddress to
  GnssNetworkConnectivityHandler.java

Bug: 182963397
Test: m
Change-Id: I1fb5ecfbe37878ba3534e6c6c7599ca29db2735c
2021-03-22 11:51:27 +08:00
Remi NGUYEN VAN
0c66c1a253 Add NetworkFactory to connectivity jarjar rules
NetworkFactory is part of net-utils-device-common, but is outside of
the com.android.net.module.util and needs a separate jarjar rule.

Bug: 171540887
Test: atest FrameworksNetTests
Change-Id: Iec828a789175acdbe4e7f35e4cc942922540495c
2021-03-22 03:50:15 +00:00
Lorenzo Colitti
8b6e155a59 Merge "Use connectivity resources in service-connectivity" into sc-dev 2021-03-22 02:21:13 +00:00
Remi NGUYEN VAN
12e02a3da5 Merge "Use jniThrowErrnoException from JNIHelp" into sc-dev 2021-03-22 00:20:36 +00:00
Roshan Pius
39ff19da2f resolve merge conflicts of d2c4f1d6c8 to stage-aosp-master
Merged-In: Ib9d7923104ac0a60f6af5a3a2d2b7f13bc0262e3
Change-Id: Ib9d7923104ac0a60f6af5a3a2d2b7f13bc0262e3
2021-03-21 19:20:35 +00:00
Roshan Pius
332e7a241a resolve merge conflicts of 403b7fd0b0a6736bcee1817fb5c774f8c8a040de to stage-aosp-master
Change-Id: Ib9d7923104ac0a60f6af5a3a2d2b7f13bc0262e3
2021-03-21 19:16:33 +00:00
Chiachang Wang
7d909af3bb [automerger skipped] Revert "Revert "Expose uids related APIs in NetworkRequest and N..." am: 8d81c8d76b -s ours am: 9991401b9d -s ours
am skip reason: skip tag Change-Id I107c329d4d7130d488772166eae8b5e7aaa2ff04 with SHA-1 f379ceec8e is already in history

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

Change-Id: Iecaae6936535a5c00d1a895c1410d2f0e5531261
2021-03-21 17:30:02 +00:00
Lorenzo Colitti
a043655e3a Merge changes from topic "backport-connectivityresources" am: a31a7b1bf4 am: dd37a5d576
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645297

Change-Id: I5d547c23baf7798e09d9d9aad188f094ebfe4cfe
2021-03-21 17:29:33 +00:00
Lorenzo Colitti
28a89348a9 Cherry-pick some test changes from ag/13210542. am: e7963a1d82 am: eb0dc8f775
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645000

Change-Id: I22e26261dcc59274c4286271409ee63c1760b074
2021-03-21 17:29:29 +00:00
Remi NGUYEN VAN
30c4960d7e Add connectivity protos to framework-connectivity am: 953819d7f0 am: 00b56b8d0d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635040

Change-Id: Ieaa65408c13f5224b23cae8a4cebf79b4d7ed676
2021-03-21 17:29:25 +00:00
paulhu
634e8a5b2a Remove unused NetworkPolicyManagerInternal in CS am: c850635440 am: 143739703d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646969

Change-Id: I8e19008eb864b2cafc1725e96b85c51372913c22
2021-03-21 17:29:21 +00:00
Remi NGUYEN VAN
909eb08445 Move connectivity AIDLs to android.net am: 6ed4472b63 am: e6fe8b4103
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1596272

Change-Id: I6cf9779f473b623d9aea6e67e1c57e2d6731617d
2021-03-21 17:29:17 +00:00
Remi NGUYEN VAN
50fab6449d Migrate framework-connectivity internal resources am: 8e12782094 am: 1f00de9e81
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1641905

Change-Id: If36c3148d1a8c487ca3f25fa65e9b593f4e4d19d
2021-03-21 17:29:14 +00:00
Remi NGUYEN VAN
3f139e72f6 Add multipath preference, background status API am: 0f91b7a19a am: 6f3429172b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644388

Change-Id: I437cb3ab5a778004c7bc03156b74e9e04f93b55b
2021-03-21 17:29:04 +00:00
Chiachang Wang
9991401b9d [automerger skipped] Revert "Revert "Expose uids related APIs in NetworkRequest and N..." am: 8d81c8d76b -s ours
am skip reason: skip tag Change-Id I107c329d4d7130d488772166eae8b5e7aaa2ff04 with SHA-1 f379ceec8e is already in history

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

Change-Id: I1773af223afb67d522cc05d3658608505340023e
2021-03-21 16:55:29 +00:00
Lorenzo Colitti
dd37a5d576 Merge changes from topic "backport-connectivityresources" am: a31a7b1bf4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645297

Change-Id: Id6e8f89870b70332212e9052168e6f7c2faa3ee3
2021-03-21 16:51:02 +00:00
Lorenzo Colitti
eb0dc8f775 Cherry-pick some test changes from ag/13210542. am: e7963a1d82
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645000

Change-Id: Iebfee24a963aac516bf44ef70128ffdaeec25a45
2021-03-21 16:48:06 +00:00
Remi NGUYEN VAN
00b56b8d0d Add connectivity protos to framework-connectivity am: 953819d7f0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635040

Change-Id: Idebb84324407d0ce2f0066888b14fc22df736515
2021-03-21 16:45:11 +00:00
paulhu
143739703d Remove unused NetworkPolicyManagerInternal in CS am: c850635440
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646969

Change-Id: I5a838b1017d1648e67576bfd7940ea9161b2c764
2021-03-21 16:43:40 +00:00
Remi NGUYEN VAN
e6fe8b4103 Move connectivity AIDLs to android.net am: 6ed4472b63
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1596272

Change-Id: If61c15ea55ec2081eab7fd2368e77f16ef51c769
2021-03-21 16:41:38 +00:00
Treehugger Robot
d2c4f1d6c8 Merge changes from topics "revert-1645768-revert-1626206-replaceUidRange-MSYTKFNGUE-HIUTVTIGIR", "ti_redaction"
* changes:
  TransportInfo: Add a generic redaction mechanism
  Revert "Revert "Expose uids related APIs in NetworkRequest and N..."
  Revert^2 "Replace the usage of UidRange"
2021-03-21 16:41:13 +00:00
Remi NGUYEN VAN
1f00de9e81 Migrate framework-connectivity internal resources am: 8e12782094
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1641905

Change-Id: I21a5632d566b2ef883c48f60b420fb76d04a3e05
2021-03-21 16:38:40 +00:00
Remi NGUYEN VAN
6f3429172b Add multipath preference, background status API am: 0f91b7a19a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644388

Change-Id: I4c1a53223c4cce7759b2cc3efb74a6568abcde57
2021-03-21 16:37:02 +00:00
Lorenzo Colitti
a31a7b1bf4 Merge changes from topic "backport-connectivityresources"
* changes:
  Use module resources in NetworkNotificationManager.
  Cherry-pick some test changes from ag/13210542.
  Add connectivity protos to framework-connectivity
  Remove unused NetworkPolicyManagerInternal in CS
  Move connectivity AIDLs to android.net
  Migrate framework-connectivity internal resources
  Expose isUidNetworkingBlocked and isUidRestrictedOnMeteredNetworks
  Add multipath preference, background status API
2021-03-21 15:47:28 +00:00
Lorenzo Colitti
e7963a1d82 Cherry-pick some test changes from ag/13210542.
ag/13210542 switched from using reset() on mResources to using
clearInvocations(). This ensures that only the previous calls are
reset, and that the mock continues to behave according to what
was specified in setUp.

Test: 183097033
Test: test-only change
Merged-In: I35d28c8df341dbbac2774026c6ca749e296c0482
Change-Id: Ieef982d2df50db3014f35f58a77674939ebe0d43
2021-03-21 01:54:51 +09:00
Lorenzo Colitti
2ce7470845 Use module resources in NetworkNotificationManager.
Also make getTransportName non-static so it can access the module
resources.

Also fix a duplicate comment in a resource file.

Bug: 183097033
Test: atest FrameworksNetTests
Test: connected to Wi-Fi with no Internet, observed notification
Change-Id: Ic0d24d36af0b87153d527083f8964ddc6cd78482
Merged-In: Ic0d24d36af0b87153d527083f8964ddc6cd78482
2021-03-21 01:54:51 +09:00
Remi NGUYEN VAN
9de8916610 Use connectivity resources in service-connectivity
Migrate resource usage to the connectivity resource package.
For framework resources that have known overlays, keep a fallback until
the overlays can be migrated.

Bug: 182125649
Test: atest FrameworksNetTests
Change-Id: I778d94a5aac0c4e20e78b1ba3a002495c17a38a0
2021-03-21 01:39:51 +09:00
Lorenzo Colitti
db1ad4da2b Merge "Copy NetworkNotificationManager resources to conectivity module." am: 4385ef6896 am: cc018f77ec
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644996

Change-Id: Ie3ebc18ad8f2848313f9e238744252dbee723ff3
2021-03-20 15:09:31 +00:00
Lorenzo Colitti
cc018f77ec Merge "Copy NetworkNotificationManager resources to conectivity module." am: 4385ef6896
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644996

Change-Id: I97d371fc7c299828c34d1d60965e9f4959e685a3
2021-03-20 14:30:22 +00:00
Lorenzo Colitti
4385ef6896 Merge "Copy NetworkNotificationManager resources to conectivity module." 2021-03-20 13:52:46 +00:00
Remi NGUYEN VAN
953819d7f0 Add connectivity protos to framework-connectivity
The protos are built separately by framework-connectivity from framework
protos, keeping only android.net protos for the connectivity jar.

Bug: 171860710
Test: m framework-connectivity.impl
Change-Id: I2c4a37ff2ee9e8efde49885feeafa27dcff7ca2c
Merged-In: I2c4a37ff2ee9e8efde49885feeafa27dcff7ca2c
2021-03-20 22:51:35 +09:00
paulhu
c850635440 Remove unused NetworkPolicyManagerInternal in CS
ConnectivityService doesn't call any NPMI methods, so remove all
usage from CS.

Bug: 170598012
Test: atest FrameworksNetTests
Test: atest FrameworksNetIntegrationTests
Change-Id: I8719ef2e96e7db9da2894b467b9e7a1bc09de386
Merged-In: I8719ef2e96e7db9da2894b467b9e7a1bc09de386
2021-03-20 22:51:35 +09:00
Remi NGUYEN VAN
6ed4472b63 Move connectivity AIDLs to android.net
java_sdk_libraries and apexes need to contain bootclasspath classes
under predefined packages. Tethering currently uses android.net, so make
sure all the connectivity bootclasspath classes are under android.net.

This avoids maintaining two packages for the tethering APEX, where
com.android.connectivity.aidl is only used by internal AIDL files.

Bug: 182984842
Test: m
Change-Id: I611f1941698c574e37aea912ee76dadc8b32e41a
Merged-In: I611f1941698c574e37aea912ee76dadc8b32e41a
2021-03-20 22:51:35 +09:00
Remi NGUYEN VAN
8e12782094 Migrate framework-connectivity internal resources
Use ServiceConnectivityResources instead.
Start by creating resources in the ServiceConnectivityResources package
to match the internal configuration, and common overlays.

Bug: 182125649
Test: device boots, has connectivity
Change-Id: I77a3efca2cd644f9828db1ed5d3cae8070fb8363
Merged-In: I77a3efca2cd644f9828db1ed5d3cae8070fb8363
2021-03-20 22:35:16 +09:00
Remi NGUYEN VAN
0f91b7a19a Add multipath preference, background status API
Add APIs for getMultipathPreference and getRestrictBackgroundStatus.
Both are used by Connectivity to back the external
ConnectivityManager.getRestrictBackgroundStatus, and
ConnectivityManager.getMultipathPreference APIs.

Test: atest CtsNetTestCases
      atest ConnectivityServiceTests
      atest NetworkPolicyManagerServiceTest
Bug: 176289731
Change-Id: I8a03162b2f6691086bb64e75ffd354cdfca7f86a
Merged-In: I8a03162b2f6691086bb64e75ffd354cdfca7f86a
2021-03-20 22:23:16 +09:00