Commit Graph

13028 Commits

Author SHA1 Message Date
Lucas Lin
4b44bfce87 Merge "Add annotation for Vpn#getNetwork()" am: 3483ccf883 am: b4ac20f26b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653946

Change-Id: Iaad97aa7b05f7583fc740d0bdaeffd8f23566086
2021-03-25 12:39:43 +00:00
Lucas Lin
82131f1f82 Merge "Remove the usage of NETID_UNSET from Vpn.java" am: 0f114dff28 am: 22f8ded94a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653929

Change-Id: I5e2dbb8cc31939b1fdc8abc785cb43e9519513af
2021-03-25 12:39:18 +00:00
Lucas Lin
59d8bd7380 Merge "Expose some APIs from ConnectivityManager" am: bcf2a79ec8 am: cc2827494a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653936

Change-Id: I9dac472715fc8f32cb6313f2df8aef872bec9632
2021-03-25 12:38:47 +00:00
Lucas Lin
b4ac20f26b Merge "Add annotation for Vpn#getNetwork()" am: 3483ccf883
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653946

Change-Id: I3be5109c253365b3c5bc56ae48114f8e37c4f153
2021-03-25 12:30:18 +00:00
Lucas Lin
22f8ded94a Merge "Remove the usage of NETID_UNSET from Vpn.java" am: 0f114dff28
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653929

Change-Id: Ic50dee391e123b9e9debb8e77bac1f0499d939f1
2021-03-25 12:25:42 +00:00
Lucas Lin
fa31b5bfe8 Merge changes Ic2357dcf,Iddf8c71a am: 29ed3efbfe am: 6cece1f221
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653939

Change-Id: Icf3acbfb071fc2d24f0d31c719446604567e2281
2021-03-25 12:23:01 +00:00
lucaslin
c76b482ada Expose NetworkScore to external caller am: 026a987e1e am: e1f3a8b1da
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653938

Change-Id: I807cae8d95e8d5fb1f017b1ba11d800772ba3e9c
2021-03-25 12:22:59 +00:00
Lucas Lin
cc2827494a Merge "Expose some APIs from ConnectivityManager" am: bcf2a79ec8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653936

Change-Id: I1a31a6162d5098770c0d5b19faa7af83553f6a2e
2021-03-25 12:17:18 +00:00
Lucas Lin
6cece1f221 Merge changes Ic2357dcf,Iddf8c71a am: 29ed3efbfe
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653939

Change-Id: I9c5f96893488f1e103cba740a0bbfb474ffe90b9
2021-03-25 12:07:49 +00:00
lucaslin
e1f3a8b1da Expose NetworkScore to external caller am: 026a987e1e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653938

Change-Id: I5f2fb6bb6f2de4d81fb3b750053ee5abbe82caeb
2021-03-25 11:53:29 +00:00
Lucas Lin
3483ccf883 Merge "Add annotation for Vpn#getNetwork()" 2021-03-25 11:29:38 +00:00
Lucas Lin
0f114dff28 Merge "Remove the usage of NETID_UNSET from Vpn.java" 2021-03-25 11:29:17 +00:00
Lucas Lin
bcf2a79ec8 Merge "Expose some APIs from ConnectivityManager" 2021-03-25 11:29:08 +00:00
Lucas Lin
29ed3efbfe Merge changes Ic2357dcf,Iddf8c71a
* changes:
  Expose NetworkAgent constructor taking a NetworkScore parameter
  Expose NetworkScore to external caller
2021-03-25 11:28:28 +00:00
lucaslin
150976c603 Add annotation for Vpn#getNetwork()
- Add @VisibleForTesting & @Nullable for Vpn#getNetwork().
- Remove null check in caller side(test) of Vpn#getNetwork()
because if the code is working properly, it can never be null.

Bug: 182963397
Test: atest FrameworksNetTests
Change-Id: Ic52864003fbebd9f4e95d43fefc2e168437b0122
Merged-In: Ic52864003fbebd9f4e95d43fefc2e168437b0122
  (cherry-picked from ag/13946573)
2021-03-25 10:21:07 +00:00
lucaslin
6b49587384 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
Merged-In: I69d449705b1dc541287c72af8dc7705dc4733109
  (cherry-picked from ag/13927650)
2021-03-25 10:19:05 +00:00
Chiachang Wang
823542095f Expose NetworkAgent constructor taking a NetworkScore parameter
Vpn constructs NetworkAgent with this exposed NetworkAgent
constructor. Given NetworkAgent is moving into the incoming
connectivity module, Vpn which is outside the module will not
be able to access it if it's not in the API surface. Thus,
expose it to allow Vpn to use it.

Bug: 182963397
Test: make update-api
Change-Id: Ic2357dcfff3233e0dd17b48b0e376a5095ef60fa
Merged-In: Ic2357dcfff3233e0dd17b48b0e376a5095ef60fa
CTS-Coverage-Bug: 172183305
  (cherry-picked from ag/13966707)
2021-03-25 08:40:27 +00:00
lucaslin
026a987e1e Expose NetworkScore to external caller
NetworkScore will be a part of mainline module, so the external
callers cannot call its hidden APIs. Expose needed APIs to
the external callers.

CTS-Coverage-Bug: 182963397
Bug: 182963397
Test: m
Change-Id: Iddf8c71a5f51a40bc6ff78626b3e8ee530d1b7eb
Merged-In: Iddf8c71a5f51a40bc6ff78626b3e8ee530d1b7eb
  (cherry-picked from ag/13947595)
2021-03-25 08:15:09 +00:00
lucaslin
2e68aa2e7a 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
Merged-In: I1fb5ecfbe37878ba3534e6c6c7599ca29db2735c
  (cherry-picked from ag/13927657)
2021-03-25 08:07:53 +00:00
Treehugger Robot
fcf54cf966 Merge "Use a longer test timeout in integration test" am: f652408e6c am: 7ffa156a73
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1650287

Change-Id: Iac1fdb3d92501b292ecbff1f9a75bcecbcb23725
2021-03-25 02:36:19 +00:00
Treehugger Robot
7ffa156a73 Merge "Use a longer test timeout in integration test" am: f652408e6c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1650287

Change-Id: Ia76f196039f7d748f47bd4e9a62eb59c8ad1b116
2021-03-25 01:53:51 +00:00
Treehugger Robot
f652408e6c Merge "Use a longer test timeout in integration test" 2021-03-25 01:24:51 +00:00
Jayachandran Chinnakkannu
3bad6f9856 Merge "Add 5G/NR QOS support" am: df448f6eaa am: 6ed7c1c523
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1643762

Change-Id: If32e710cfea988dbaa438ffee547707aa06e6545
2021-03-24 18:54:17 +00:00
Treehugger Robot
688f015e64 Merge "Move BLOCKED_REASON_* constants from NPMS into ConnectivityManager." am: eb3ba19447 am: c97c779c98
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1651532

Change-Id: I99fe564e3fd7e6e92416a3d76054e62969cdd48f
2021-03-24 18:53:30 +00:00
Jayachandran Chinnakkannu
6ed7c1c523 Merge "Add 5G/NR QOS support" am: df448f6eaa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1643762

Change-Id: Icd4c21b9731256c9b3d39bffc5fddc43276c5fda
2021-03-24 18:26:19 +00:00
Treehugger Robot
c97c779c98 Merge "Move BLOCKED_REASON_* constants from NPMS into ConnectivityManager." am: eb3ba19447
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1651532

Change-Id: If272068940e9a06efbb40149e2b4dd5fbb1185d6
2021-03-24 18:13:19 +00:00
Jayachandran Chinnakkannu
df448f6eaa Merge "Add 5G/NR QOS support" 2021-03-24 17:44:48 +00:00
Treehugger Robot
eb3ba19447 Merge "Move BLOCKED_REASON_* constants from NPMS into ConnectivityManager." 2021-03-24 17:22:50 +00:00
Sudheer Shanka
04aab0f60f Move BLOCKED_REASON_* constants from NPMS into ConnectivityManager.
These constants will now be including all the reasons for why an
uid's network access can be blocked, instead of only the
restrictions that could be imposed by NPMS.

Bug: 183473548
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Merged-In: I4c544415e12adf442fd2415c371b1b70a39c3aa4
Change-Id: I6dcea43fbefa9eac8b5a971b822a5be5422a54b4
2021-03-25 01:33:26 +09:00
Jayachandran C
8ae3bf3f92 Add 5G/NR QOS support
Bug: 155176305
Bug: 182317794
Test: atest ConnectivityServiceTest
      atest QosCallbackTrackerTest

Change-Id: Idf6d8a7c3b80bc50a2c1244ceaefea9381d40c2f
2021-03-23 19:14:21 -07:00
Junyu Lai
b5d62d1f83 Merge "Fix cannot find removeUnwantedCapability on R device" am: 3ef6584f1b am: f85195ae06
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649302

Change-Id: Ia574c52344290f5baf5fbee90ed1f6f7c7e0f92c
2021-03-23 13:29:15 +00:00
Junyu Lai
f85195ae06 Merge "Fix cannot find removeUnwantedCapability on R device" am: 3ef6584f1b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649302

Change-Id: I11ee0a8d6388f78a9db90756c0cbee93c923e1b8
2021-03-23 12:46:45 +00:00
Junyu Lai
3ef6584f1b Merge "Fix cannot find removeUnwantedCapability on R device" 2021-03-23 12:16:18 +00:00
Chiachang Wang
b948cc3ba0 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
2021-03-23 12:10:57 +00:00
Chiachang Wang
5898f562ed 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
2021-03-23 12:09:42 +00:00
Chiachang Wang
06238861b5 Merge "Correct the logic in NetworkCapabilitiesTest" am: 2848cdf348
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649297

Change-Id: I32bc9ee2db0b192513f782455a91d7336875a039
2021-03-23 12:07:47 +00:00
Chiachang Wang
2848cdf348 Merge "Correct the logic in NetworkCapabilitiesTest" 2021-03-23 11:46:31 +00:00
Chiachang Wang
eefea38ae5 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
2021-03-23 11:36:07 +00:00
Chiachang Wang
08bebe4609 Merge "Add NetworkRequest.Builder creating from an existing instance" 2021-03-23 10:46:20 +00:00
junyulai
1ed0b04410 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)
2021-03-23 17:40:55 +08:00
Remi NGUYEN VAN
2c5c322eb9 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
2021-03-23 09:33:16 +00:00
Chiachang Wang
29d00bc32d 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
2021-03-23 15:16:39 +08:00
Chiachang Wang
992047ed78 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
2021-03-23 14:50:03 +08:00
Junyu Lai
aec7499fca 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
2021-03-23 05:51:55 +00:00
Lorenzo Colitti
bb50fd24b3 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
2021-03-23 05:51:32 +00:00
Junyu Lai
4a074bc753 Merge "[VCN15] expose addUnwantedCapability and related APIs" am: 20d187254b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1639654

Change-Id: Ie88ff422c473d3891a054fa75b5175b30c10cec9
2021-03-23 05:27:53 +00:00
Lorenzo Colitti
70e7af26c4 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
2021-03-23 05:18:03 +00:00
Junyu Lai
20d187254b Merge "[VCN15] expose addUnwantedCapability and related APIs" 2021-03-23 05:02:22 +00:00
Lorenzo Colitti
c643098b0b Merge "Have a new method in NetworkAgentConfig.Builder to set allowBypass" 2021-03-23 04:40:50 +00:00
Lorenzo Colitti
12b8bb5c19 Merge changes I638ed5cd,I29f15571,I21a22ed1 am: 71996469d2 am: 068f44831d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1648068

Change-Id: Ia0b6ffa74536e3f20f13282d08bd858fc9e979bf
2021-03-23 02:10:45 +00:00