Commit Graph

13988 Commits

Author SHA1 Message Date
Treehugger Robot
5654c21221 [automerger skipped] Merge "Reland "Add an API to listen for changes in network blocked status of an uid."" am: cd3ea1f002 -s ours am: e58eafa8c4 -s ours am: 363f1b34c4 -s ours
am skip reason: skip tag Change-Id Ib9949b8619c6b148f73630b314c4113d76c31ec1 with SHA-1 cb5fd4a670 is already in history

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

Change-Id: Ib90dc576f29662385479a9f7bbb16cdca13ef826
2021-03-19 11:31:48 +00:00
Treehugger Robot
363f1b34c4 [automerger skipped] Merge "Reland "Add an API to listen for changes in network blocked status of an uid."" am: cd3ea1f002 -s ours am: e58eafa8c4 -s ours
am skip reason: skip tag Change-Id Ib9949b8619c6b148f73630b314c4113d76c31ec1 with SHA-1 cc8f26dea8 is already in history

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

Change-Id: Iffa4b2d7c7a9d03a70a6a01a545bb91e88bfebb1
2021-03-19 11:07:23 +00:00
Remi NGUYEN VAN
abba870866 Merge "Move connectivity AIDLs to android.net" into sc-dev 2021-03-19 10:51:22 +00:00
Treehugger Robot
e58eafa8c4 [automerger skipped] Merge "Reland "Add an API to listen for changes in network blocked status of an uid."" am: cd3ea1f002 -s ours
am skip reason: skip tag Change-Id Ib9949b8619c6b148f73630b314c4113d76c31ec1 with SHA-1 cc8f26dea8 is already in history

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

Change-Id: I19a6e876187a5cf64a00c3f2dac15c8bec8f2911
2021-03-19 10:46:12 +00:00
Chiachang Wang
d8802f6968 Merge "Expose constants of ConnectivityManager" into sc-dev 2021-03-19 10:40:49 +00:00
Chiachang Wang
293900ff01 Merge changes from topic "replaceUidRange" into sc-dev
* changes:
  Expose uids related APIs in NetworkRequest and NetworkCapabilities
  Replace the usage of UidRange
2021-03-19 10:32:30 +00:00
Paul Hu
e6acab8b9a Merge "Remove unused NetworkPolicyManagerInternal in CS" into sc-dev 2021-03-19 10:21:40 +00:00
Treehugger Robot
cd3ea1f002 Merge "Reland "Add an API to listen for changes in network blocked status of an uid."" 2021-03-19 10:12:15 +00:00
Chiachang Wang
e79617978f Merge "Send a Network instead of network id for wifi no internet dialog" am: 94dc99ea38 am: 3ff1e2fe49 am: 7bbc040746
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644766

Change-Id: I54259f3084560fe457e3108dee815d0e305675c2
2021-03-19 09:43:49 +00:00
Aaron Huang
511a67f767 Merge "Remove hidden API usage from ProxyTracker" am: ed15b01b0d am: 2f04604df2 am: 330ba163d9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646966

Change-Id: I4c5e91ae575c5cd79198a47572a7403e12d64dfa
2021-03-19 09:43:21 +00:00
Lorenzo Colitti
c5f2fd7fb7 Merge "Ensure all calls to getCallingUid use the version in mDeps." am: a6b1b9d110 am: 18e2734d2f am: c3b003da37
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635320

Change-Id: I064e02172a86cd68afb757004102c68ce331dda6
2021-03-19 09:42:53 +00:00
Remi NGUYEN VAN
af56509da2 Merge "Revert "CaptivePortalData: use CharSequence in VenueFriendlyName API"" into sc-dev 2021-03-19 09:38:35 +00:00
Chiachang Wang
7bbc040746 Merge "Send a Network instead of network id for wifi no internet dialog" am: 94dc99ea38 am: 3ff1e2fe49
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644766

Change-Id: I1428a4bf9be18601ff70e8fc50e06fecac158a4b
2021-03-19 09:02:20 +00:00
Aaron Huang
330ba163d9 Merge "Remove hidden API usage from ProxyTracker" am: ed15b01b0d am: 2f04604df2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646966

Change-Id: Idd7ae6ad01db35ed2ea47abab183ae423439ede9
2021-03-19 09:02:08 +00:00
Lorenzo Colitti
c3b003da37 Merge "Ensure all calls to getCallingUid use the version in mDeps." am: a6b1b9d110 am: 18e2734d2f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635320

Change-Id: Ib427fa0d6d9b2ecf35e820db9eb1dc762a81bb3a
2021-03-19 09:01:55 +00:00
Chiachang Wang
3ff1e2fe49 Merge "Send a Network instead of network id for wifi no internet dialog" am: 94dc99ea38
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644766

Change-Id: I676152104fafb5c4e1b93f0e39fa39e43dd6891c
2021-03-19 08:27:56 +00:00
Aaron Huang
2f04604df2 Merge "Remove hidden API usage from ProxyTracker" am: ed15b01b0d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1646966

Change-Id: I2d609875a3a31586626a82dddbfcb015bf5ca0bf
2021-03-19 08:27:14 +00:00
Lorenzo Colitti
18e2734d2f Merge "Ensure all calls to getCallingUid use the version in mDeps." am: a6b1b9d110
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635320

Change-Id: I6719b51b78ace57bc36f4dba738c0c420947a8bf
2021-03-19 08:24:59 +00:00
Remi NGUYEN VAN
f5bcd32331 Revert "CaptivePortalData: use CharSequence in VenueFriendlyName API"
This reverts commit 89aaa0c517.

Reason for revert: b/183174863
Bug: 183174863

Change-Id: I4db923e112bba149f4e8eb4cfa8c3f97defd5e63
2021-03-19 08:10:35 +00:00
Chiachang Wang
94dc99ea38 Merge "Send a Network instead of network id for wifi no internet dialog" 2021-03-19 07:54:24 +00:00
Aaron Huang
ed15b01b0d Merge "Remove hidden API usage from ProxyTracker" 2021-03-19 07:50:27 +00:00
Remi NGUYEN VAN
8ffe4eb5e3 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
2021-03-19 07:44:21 +00:00
Lorenzo Colitti
a6b1b9d110 Merge "Ensure all calls to getCallingUid use the version in mDeps." 2021-03-19 07:36:52 +00:00
Chalard Jean
2a98777408 Merge "[NS02] Mix in validation of the score" am: a5323dd580 am: 211f271ce4 am: ff706470e9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556100

Change-Id: I4a622efe89f7d116751d0243ba29441ef76e997a
2021-03-19 07:27:43 +00:00
Chalard Jean
ff706470e9 Merge "[NS02] Mix in validation of the score" am: a5323dd580 am: 211f271ce4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556100

Change-Id: I9f628ce479db20f26a1ea1549ab11635613ccfa9
2021-03-19 06:44:12 +00:00
paulhu
d97c467e2a 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
2021-03-19 14:29:01 +08:00
Chalard Jean
211f271ce4 Merge "[NS02] Mix in validation of the score" am: a5323dd580
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556100

Change-Id: I229c3033a16d6b7f11f1b3f02351cc0d2153d199
2021-03-19 06:05:28 +00:00
Aaron Huang
d1a8c71ed9 Remove hidden API usage from ProxyTracker
Connectivity mainline module cannot use HandlerExecutor because it
is a hidden API. So, replace it with alternative.

Bug: 177035719
Test: FrameworksNetTests
Change-Id: I228a8a2e3479b0af1e977d13f877a565f0789a7e
2021-03-19 06:03:08 +00:00
Remi NGUYEN VAN
2a311db05b Build framework-connectivity using module_current
framework-connectivity needs to build only against stable APIs.

Bug: 171540887
Test: m framework-connectivity.impl
Change-Id: I2d51d37d067bf6fe86e4dedf05855a2dd67ed57c
2021-03-19 06:02:43 +00:00
Chalard Jean
a5323dd580 Merge "[NS02] Mix in validation of the score" 2021-03-19 05:39:40 +00:00
Treehugger Robot
89aaa0c517 Merge "CaptivePortalData: use CharSequence in VenueFriendlyName API" am: f678876c62 am: cbb8786faf am: 9f4d989074
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640985

Change-Id: I933407d55e33a2cfac44ded44bc58fc0deb9da80
2021-03-19 05:32:21 +00:00
Treehugger Robot
9f4d989074 Merge "CaptivePortalData: use CharSequence in VenueFriendlyName API" am: f678876c62 am: cbb8786faf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640985

Change-Id: I5c04566c379e2cad164d55050ffdc9152432dfd3
2021-03-19 05:27:46 +00:00
Chalard Jean
6bde0e5c04 [NS02] Mix in validation of the score
Test: FrameworksNetTests FrameworksWifiTests NetworkStackTests
Change-Id: I9cac3a05ad0c4008599973b12d2c5e4c02233a5c
2021-03-19 13:50:56 +09:00
Remi NGUYEN VAN
c54ceba085 Merge "Remove Preconditions usage in TestNetworkSpecifier" into sc-dev 2021-03-19 04:49:52 +00:00
Remi NGUYEN VAN
a59373b155 Merge "Revert "Revert "Remove connectivity dependency on Preconditions""" into sc-dev 2021-03-19 04:49:06 +00:00
Treehugger Robot
cbb8786faf Merge "CaptivePortalData: use CharSequence in VenueFriendlyName API" am: f678876c62
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640985

Change-Id: I26db95ad9d91dec40a62b7e4c4c0b77133ddb5d3
2021-03-19 04:42:53 +00:00
Treehugger Robot
f678876c62 Merge "CaptivePortalData: use CharSequence in VenueFriendlyName API" 2021-03-19 04:13:36 +00:00
Remi NGUYEN VAN
75764ba611 Merge "Add InetAddressCompat" am: e1da163302 am: 2aec625379 am: 9bdd98e71d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645289

Change-Id: I90dba64e96080cbd29f538de6dcb514dea4b6cbd
2021-03-19 02:52:58 +00:00
Remi NGUYEN VAN
2270e98802 Merge "Move network selection utils to Connectivity" am: f0f68f5561 am: b1155aa195 am: b4525057e5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645291

Change-Id: I0b984a01e1688b8484f3500945d0e429e1b3ca00
2021-03-19 02:52:41 +00:00
lucaslin
1a0ca5f171 Expose constants of ConnectivityManager
The callers cannot call the hidden APIs after ConnectivityManager
became a part of mainline module, so expose them for callers.
Also change the value of ACTION_PROMPT_PARTIAL_CONNECTIVITY,
ACTION_PROMPT_LOST_VALIDATION and ACTION_PROMPT_UNVALIDATED because
of API lint errors.

Bug: 172183305
Test: Check private DNS settings is normal, and test NO_INTERNET
      notification can be shown normally.
Change-Id: I715c766ad8e5eb54f4dc67239c1dbca7239506fc
2021-03-19 10:51:36 +08:00
Chiachang Wang
ef52aade37 Send a Network instead of network id for wifi no internet dialog
It's a refactor work for incoming connectivity mainline. The
network information contained in the no internet notification
action was placed the target network id. The receiver which is
Settings will need to construct the network from the network id
using the hidden Network constructor. Since Network is moving
into module, Settings will not be able to access it. Apps should
use Network instead of network id, so just send the network
object to Settings.

Bug: 172183305
Test: manually test with no internet dialog and check the
      behavior and log
Test: atest FrameworksNetTests
Change-Id: I68acc70a26a27eeeb9ab7af068a459905839f942
2021-03-19 02:08:01 +00:00
Remi NGUYEN VAN
9bdd98e71d Merge "Add InetAddressCompat" am: e1da163302 am: 2aec625379
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645289

Change-Id: I94fef501699aa01c997a03dd24a5a25442075af1
2021-03-19 01:10:06 +00:00
Remi NGUYEN VAN
b4525057e5 Merge "Move network selection utils to Connectivity" am: f0f68f5561 am: b1155aa195
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645291

Change-Id: Ia276fc1988baf3240f120682170d6c41ee01839e
2021-03-19 01:09:30 +00:00
Remi NGUYEN VAN
2aec625379 Merge "Add InetAddressCompat" am: e1da163302
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645289

Change-Id: I6946ca309ae923a637f5e5f0ad73c91b26b3c376
2021-03-19 00:39:34 +00:00
Chiachang Wang
6f96bb4b34 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
Change-Id: I107c329d4d7130d488772166eae8b5e7aaa2ff04
2021-03-19 08:39:07 +08:00
Remi NGUYEN VAN
1bdf4ba870 Remove Preconditions usage in TestNetworkSpecifier
Preconditions is a hidden API utility. It can be easily replace by
inline checks.

Bug: 177046265
Test: m
Change-Id: I3f722075fb9c74e12e40348ba4faad2f0fa67178
2021-03-19 00:35:27 +00:00
Remi NGUYEN VAN
c4dd8c9142 Revert "Revert "Remove connectivity dependency on Preconditions""
Preconditions.checkNotNull is deprecated to be replaced by
Objects.requireNonNull, and other methods can easily be replaced by
inline checks.

Preconditions is an internal API class that should not be used by
unbundled jars.

Bug: 177046265
Change-Id: I3a67d266b32142c034520acbcdc30f7213db5e13
Test: m
2021-03-19 00:35:27 +00:00
Remi NGUYEN VAN
b1155aa195 Merge "Move network selection utils to Connectivity" am: f0f68f5561
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645291

Change-Id: I452591707a97b501f189fa9f61e90da842fa3734
2021-03-19 00:35:03 +00:00
Chiachang Wang
d5034c7e9b 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
Change-Id: I4e5aec6ef1ea02e038fcd7ed117a3b67b69c5cb9
2021-03-19 08:33:07 +08:00
Remi NGUYEN VAN
e1da163302 Merge "Add InetAddressCompat" 2021-03-18 23:58:16 +00:00