Commit Graph

14254 Commits

Author SHA1 Message Date
Lucas Lin
ccf3768a44 [automerger skipped] Merge changes Ic2357dcf,Iddf8c71a am: 29ed3efbfe am: 6cece1f221 am: fa31b5bfe8 -s ours
am skip reason: skip tag Change-Id Ic2357dcfff3233e0dd17b48b0e376a5095ef60fa with SHA-1 5c3c52975a is already in history

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

Change-Id: Ib7ed1d9c595b30fadf6efee2ab2614197e156ce1
2021-03-25 13:08:16 +00:00
lucaslin
2e290e01c9 [automerger skipped] Expose NetworkScore to external caller am: 026a987e1e am: e1f3a8b1da am: c76b482ada -s ours
am skip reason: skip tag Change-Id Iddf8c71a5f51a40bc6ff78626b3e8ee530d1b7eb with SHA-1 10d347a2fe is already in history

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

Change-Id: If0f542ea1a8a5dfe422cfc560f68abe7de05fb37
2021-03-25 13:07:51 +00:00
Chiachang Wang
52078e7fe7 Merge "Add network disconnected callback" into sc-dev 2021-03-25 12:24:20 +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
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
3818accfc1 Merge "Add static for constant" into sc-dev 2021-03-25 11:34:09 +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
Chiachang Wang
4ab0a63b36 Add network disconnected callback
Create a network callback to notify network agent after the
native network being destroyed by netd which means the network
is fully disconnected. The NetworkAgent may handle this event
after sending disconnect state to ConnectivityService to proceed
its pending works that have to be done after it.

Bug: 178725261
Test: make update-api
Change-Id: I602ff2c688909473b03b72c9407d4286608cff4c
CTS-Coverage-Bug: 178725261
2021-03-25 09:58:48 +00:00
Chalard Jean
e43fc14ea7 Merge "[NS04.8] Address comments from NS04 and NS04.5" into sc-dev 2021-03-25 09:34:05 +00:00
TreeHugger Robot
a2e53b9d30 Merge "Add network created callback support" into sc-dev 2021-03-25 08:52:56 +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
Chalard Jean
d7268cd556 [NS04.8] Address comments from NS04 and NS04.5
Bug: 167544279
Test: ConnectivityServiceTest
Change-Id: Ia930b3d3e723075cb47e267d589c576ee2d4490f
2021-03-25 13:35:56 +09:00
Remi NGUYEN VAN
40ca93251e Fix apex_available on service-connectivity
arc-services depends on service-connectivity, so it also needs to be
available to the platform.

Bug: 183668370
Test: m
Change-Id: Id82125e98abf59b1cc8cb3fceab376597f0496ed
2021-03-25 12:17:51 +09:00
Treehugger Robot
d39dd2f6aa Merge "Use a longer test timeout in integration test" am: f652408e6c am: 7ffa156a73 am: fcf54cf966
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1650287

Change-Id: Ie457ecaa93f96d221f75d4eb59d44bc7857c67fb
2021-03-25 03:11:16 +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
Remi NGUYEN VAN
746577e7dd Merge "Merge framework-connectivity impl and stub targets" into sc-dev 2021-03-25 02:05:06 +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
Chiachang Wang
85d72bdad0 Add network created callback support
Create a network callback to notify network agent after
netd has created the network, so that the NetworkAgent may
wait for this callback and ensure the pre-work to communicate
with netd completed.

Bug: 178725261
Test: make update-api
Change-Id: I8c2ff7bd6980ae838abc5669f9419d62741b8666
CTS-Coverage-Bug: 178725261
2021-03-25 00:27:11 +00:00
Jayachandran Chinnakkannu
24411775d7 Merge "Add 5G/NR QOS support" am: df448f6eaa am: 6ed7c1c523 am: 3bad6f9856
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1643762

Change-Id: I74c0d7d771d0b7e067dddc582389f77b8a899542
2021-03-24 18:58:50 +00:00
Treehugger Robot
f3362ecfcb [automerger skipped] Merge "Move BLOCKED_REASON_* constants from NPMS into ConnectivityManager." am: eb3ba19447 am: c97c779c98 am: 688f015e64 -s ours
am skip reason: skip tag Change-Id I4c544415e12adf442fd2415c371b1b70a39c3aa4 with SHA-1 457dfd5dec is already in history

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

Change-Id: If0f92d490fc903ba2037766a69365eb44af8027e
2021-03-24 18:57:34 +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
TreeHugger Robot
07c24e301d Merge "Move BLOCKED_REASON_* constants from NPMS into ConnectivityManager." into sc-dev 2021-03-24 16:02:56 +00:00
Remi NGUYEN VAN
972aa34432 Merge framework-connectivity impl and stub targets
Instead of using api_only: true, use a single java_sdk_library to
generate both framework-connectivity stubs and
framework-connectivity.impl.

Bug: 183600168
Test: m
Change-Id: I76d7cf1ba31a3f38ae6b9facbf1b668860c8c165
2021-03-24 23:52:58 +09:00
Remi NGUYEN VAN
5607c01e16 Merge "Add min_sdk_version to connectivity targets" into sc-dev 2021-03-24 12:48:49 +00:00
Remi NGUYEN VAN
75a61a36d6 Merge changes from topic "libframework_jni_ndk" into sc-dev
* changes:
  Build connectivity JNI against libc++_static
  Remove dependency on libnetd_client
2021-03-24 12:46:06 +00:00
Remi NGUYEN VAN
4dbc3b55c9 Add min_sdk_version to connectivity targets
All targets need min_sdk_version 30 to be included in the tethering
APEX. They will actually never be used on SDK 30 and are only loaded on
31, but this is necessary to be included in com.android.tethering.

Bug: 171540887
Test: m
Change-Id: I190fd1f3c9fabff057d0a2bd7f45b63a4fe447b3
2021-03-24 10:08:39 +00:00
Remi NGUYEN VAN
35b485e106 Build connectivity JNI against libc++_static
Instead of including the whole libc++ library by linking it dynamically,
use the static version so that unused symbols can be stripped.

This allows reducing the APEX size by 1MB (3.7MB -> 2.7MB), as otherwise
libc++ is included twice for 32 and 64 bit variants.

Bug: 171540887
Test: Device boots and has connectivity, size reduced

Change-Id: Ia66d795cf23d6f45997278300c103976433f7c5c
2021-03-24 10:08:39 +00:00
Remi NGUYEN VAN
6630463cbe Remove dependency on libnetd_client
NetworkUtils can just use the NDK to achieve the same.

Also make sure network handles can have the local nameservers flag, for
the JNI API, and create/parse them accordingly in Network.

Bug: 171540887
Test: atest CtsNetTestCases (in particular MultinetworkApiTest,
          DnsResolverTest, NetworkTest)
Change-Id: I2e7b78263f7ca0cab9458854858a7423f6bd2854
2021-03-24 10:08:39 +00:00
lucaslin
c9a448808b Add static for constant
Bug: 182963397
Test: atest IpConnectivityMetricsTest
Test: atest NetdEventListenerServiceTest
Change-Id: I3826b9efc3418a724bd3753b9ad573adc3343b72
2021-03-24 16:23:35 +08:00
Chalard Jean
7618f1a492 [NS04.7] Reinstate a necessary change
NS04.5 removed a security that it shouldn't have. Reinstate it.

Bug: 167544279
Test: ConnectivityServiceTest
Change-Id: If614da813a96d1b50a16fa4be5659e1647d9469d
2021-03-24 15:57:26 +09:00
Chalard Jean
7015275e2e Merge changes I975a9439,Idec1fe8e into sc-dev
* changes:
  [NS04.5] Have NetworkOffer embark a provider ID
  [NS04] Introduce Network Offers and their callbacks
2021-03-24 06:45:50 +00:00
Sarah Chin
605ea88c66 Merge "API to get network visible network capability name" into sc-dev 2021-03-24 05:27:45 +00:00
Lucas Lin
26990d5bc8 Merge "Add annotation for Vpn#getNetwork()" into sc-dev 2021-03-24 03:25:23 +00:00
Frank Li
00fa3f2725 Merge "Fix cannot success verify count of the networkAgent Config items on R device" into sc-dev 2021-03-24 02:35:51 +00: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
Remi NGUYEN VAN
48cd32c356 Merge "Re-implement NetworkUtils#queryUserAccess." into sc-dev 2021-03-24 01:28:35 +00:00
Lucas Lin
ffe4be60fb Merge "Get NetworkCapabilities from NetworkCallback" into sc-dev 2021-03-24 01:07:50 +00:00
Sarah Chin
89888d72e7 API to get network visible network capability name
Test: atest DataConnectionTest, DcTrackerTest
Bug: 181916712
CTS-Coverage-Bug: 183553812
Change-Id: Iae63ac4d62641cee2bd0f0c5f50dd729750d514c
2021-03-24 00:27:11 +00:00
Sudheer Shanka
457dfd5dec 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
Ignore-AOSP-First: Merging internally first to handle conflicts.
Change-Id: I4c544415e12adf442fd2415c371b1b70a39c3aa4
2021-03-23 15:26:29 -07:00
Jeff DeCew
8bbf0abc6a Merge "Remove Notification.DevFlags" into sc-dev 2021-03-23 19:50:27 +00:00