Commit Graph

12568 Commits

Author SHA1 Message Date
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
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
Lorenzo Colitti
a6b1b9d110 Merge "Ensure all calls to getCallingUid use the version in mDeps." 2021-03-19 07:36:52 +00: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
Chalard Jean
a5323dd580 Merge "[NS02] Mix in validation of the score" 2021-03-19 05:39:40 +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
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
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
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
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
Remi NGUYEN VAN
e1da163302 Merge "Add InetAddressCompat" 2021-03-18 23:58:16 +00:00
Remi NGUYEN VAN
f0f68f5561 Merge "Move network selection utils to Connectivity" 2021-03-18 23:57:34 +00:00
Anthony Stange
00a2a4c7ce [automerger skipped] Merge "Revert "Add an API to listen for changes in network blocked status of an uid."" am: 2bb1da3473 -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/+/1645826

Change-Id: Ib47f1d63ab15abf1ad8aba79f6f2922abf959010
2021-03-18 17:11:21 +00:00
Anthony Stange
37cb1551a0 Merge changes from topic "revert-1626206-replaceUidRange-MSYTKFNGUE" am: 2576238aec
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645768

Change-Id: I311d4e3e5718afbe7d9817a4c85040d8afe5d66d
2021-03-18 17:02:59 +00:00
Anthony Stange
2bb1da3473 Merge "Revert "Add an API to listen for changes in network blocked status of an uid."" 2021-03-18 16:52:08 +00:00
Anthony Stange
d88174dafd Revert "Add an API to listen for changes in network blocked status of an uid."
This reverts commit cc8f26dea8.

Reason for revert: Breaking build - b/183106805
Bug: 183106805
Merged-In: Ib9949b8619c6b148f73630b314c4113d76c31ec1
Change-Id: I9789ed81e630f49c71034b6917188983bd11d774
2021-03-18 16:51:22 +00:00
Anthony Stange
2576238aec Merge changes from topic "revert-1626206-replaceUidRange-MSYTKFNGUE"
* changes:
  Revert "Replace the usage of UidRange"
  Revert "Expose uids related APIs in NetworkRequest and NetworkCa..."
2021-03-18 16:40:53 +00:00
Anthony Stange
f0b9889ccf Revert "Replace the usage of UidRange"
Revert "Add shims for NetworkRequest"

Revert submission 1626206-replaceUidRange

Reason for revert: Breaking build - b/183106405
Reverted Changes:
I0b79c73e8:Add shims for NetworkRequest
I4bc0daf5a:Replace the usage of UidRange
I4e5aec6ef:Replace the usage of UidRange
I107c329d4:Expose uids related APIs in NetworkRequest and Net...

Change-Id: I6290429db1c8e787f8138b55b98fd92a74ac6402
2021-03-18 16:30:59 +00:00
Anthony Stange
84d92b3ce1 Revert "Expose uids related APIs in NetworkRequest and NetworkCa..."
Revert "Add shims for NetworkRequest"

Revert submission 1626206-replaceUidRange

Reason for revert: Breaking build - b/183106405
Reverted Changes:
I0b79c73e8:Add shims for NetworkRequest
I4bc0daf5a:Replace the usage of UidRange
I4e5aec6ef:Replace the usage of UidRange
I107c329d4:Expose uids related APIs in NetworkRequest and Net...

Change-Id: I45e08f89533af0d6851add38fecb5c6c114615ae
2021-03-18 16:30:59 +00:00
Sudheer Shanka
5580953ba4 Merge "Add an API to listen for changes in network blocked status of an uid." am: c262455617
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612823

Change-Id: Iff60405d8f925d0a95ea4bf3230da38ce822c9f2
2021-03-18 16:09:58 +00:00
Sudheer Shanka
c262455617 Merge "Add an API to listen for changes in network blocked status of an uid." 2021-03-18 15:29:17 +00:00
Remi NGUYEN VAN
65b24f7034 Move network selection utils to Connectivity
NetworkScore, IOnCompleteListener should be in the Connectivity scope,
as they are supporting classes for the ConnectivityManager APIs.

Bug: 181512874
Test: m
Change-Id: I6dc40a80e0bf5f86f5625b657b01eba969d41fcf
2021-03-18 23:57:26 +09:00
Remi NGUYEN VAN
33e3abb3b5 Add InetAddressCompat
Although the InetAddress symbols used by Connectivity are stable core
platform API, and should be usable, the core_current stubs are not yet
part of the module_current API.
Until that is fixed, add an InetAddressCompat utility that calls the
three static methods by reflection.

Test: atest FrameworksNetTests CtsNetTestCases
Bug: 183097033
Change-Id: I797009aeff1d39ae2dc06ef69d2e235689b43c89
2021-03-18 23:54:04 +09:00
Lucas Lin
7d2c52067f Merge "Expose systemReady for SystemServer" am: 33737f6ac4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640142

Change-Id: I4680cd76d6e5c074e291bddcf1bd4bd3871365a1
2021-03-18 14:05:03 +00:00
Chiachang Wang
38794c5290 Merge changes from topic "replaceUidRange" am: 7b582e9749
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1626206

Change-Id: I3d62d9c03ab6a418e23dd6c5e6f8317b7b375f9c
2021-03-18 14:01:33 +00:00
Chiachang Wang
94e9fb339f Merge "Expose APIs for Settings" am: 53178361ae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644202

Change-Id: Ia47e8efc3cc3f40b396c0aa0bd49afea2385e9c3
2021-03-18 13:53:36 +00:00
Lorenzo Colitti
6ace66ed21 Merge "Add a VpnManager.TYPE_VPN_OEM." am: 96d66bb7b8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1644265

Change-Id: Ie010e23484d9ec7ad31631d72292cc52c96f2c10
2021-03-18 13:50:18 +00:00
Lucas Lin
33737f6ac4 Merge "Expose systemReady for SystemServer" 2021-03-18 13:40:54 +00:00
Chiachang Wang
7b582e9749 Merge changes from topic "replaceUidRange"
* changes:
  Expose uids related APIs in NetworkRequest and NetworkCapabilities
  Replace the usage of UidRange
2021-03-18 13:36:39 +00:00
Chiachang Wang
53178361ae Merge "Expose APIs for Settings" 2021-03-18 13:27:47 +00:00
Lorenzo Colitti
96d66bb7b8 Merge "Add a VpnManager.TYPE_VPN_OEM." 2021-03-18 13:12:08 +00:00
Chalard Jean
ec138734a7 Merge "Address remaining comments on aosp/1607893" am: 08b0411d4f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640140

Change-Id: I49b1ea7e3461ef0cad563d5d7933b5535f94d08c
2021-03-18 12:59:06 +00:00
Chalard Jean
39356af73f Merge "Move constants to MODULE_LIB" am: 229cf59510
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640141

Change-Id: Ib22b9f3223af2cfe51438e2e19584ec089a4e9d2
2021-03-18 12:55:57 +00:00
Paul Hu
88d4fc79df Merge "Add more connectivity module settings" am: 9abe34a466
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1641784

Change-Id: If6fab011720145f2ba18df478e6660be442bcad5
2021-03-18 12:53:52 +00:00
Chalard Jean
08b0411d4f Merge "Address remaining comments on aosp/1607893" 2021-03-18 12:30:14 +00:00
Chalard Jean
4de6088dc9 Address remaining comments on aosp/1607893
Test: ConnectivityServiceTest
Change-Id: Icf70b20624604bfade37804311a77ef6be564c09
2021-03-18 12:30:00 +00:00
Chalard Jean
229cf59510 Merge "Move constants to MODULE_LIB" 2021-03-18 12:29:38 +00:00
Paul Hu
9abe34a466 Merge "Add more connectivity module settings" 2021-03-18 12:22:55 +00:00
Sudheer Shanka
cc8f26dea8 Add an API to listen for changes in network blocked status of an uid.
Given that ConnectivityService is moving to a mainline module, we need
a @SystemApi for it to listen for changes in blocked status of an uid.
So, we decided to create a new API for this which can provide
ConnectivityService with more info about why an uid is blocked (which
will be useful for adding a new similar onBlockedStatusChanged callback
in CM.NetworkCallback) and also captures data saver restriction without
having out to track it separately.

Currently, NPMS does some redundant computations because we are
calculating both uid rules and blocked reasons separately. In a
follow-up change, we will compute uid rules using blocked reasons
and later possibly remove that onUidRulesChanged callback.

Bug: 176289731
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Test: atest ./tests/net/java/com/android/server/ConnectivityServiceTest.java
Test: atest ./services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
Change-Id: Ib9949b8619c6b148f73630b314c4113d76c31ec1
Merged-In: Ib9949b8619c6b148f73630b314c4113d76c31ec1
2021-03-18 10:42:25 +00:00
Remi NGUYEN VAN
b78337d701 Remove extra comment
This fixes a merge conflict with downstream branches due to an
incomplete cherry-pick.

Bug: 171540887
Test: m

Merged-In: I0c0daa91ef272a19c548cf55eb2f764c95f8f844
Change-Id: I0ec602f573698578e4d72d38772c39a1b88b87d2
2021-03-18 07:11:48 +00:00
Lorenzo Colitti
3541fcbcbc Add a VpnManager.TYPE_VPN_OEM.
This needed for OEMs that have VPN types not supported by AOSP.

Bug: 171872481
Test: new test coverage in VpnTransportInfoTest
Change-Id: Ic7529bef7f12d2c74a3be5b1a4a2d54fb0d0bfac
2021-03-18 05:54:53 +00:00
paulhu
79260c21a8 Add more connectivity module settings
Add more connectivity module settings and update all references
to ConnectivitySettingsManager.

Bug: 182538166
Test: atest FrameworksNetTests
Change-Id: Ie96fbd0996ed3acb37099b6270bf3d4c2e558e9a
2021-03-18 11:58:29 +08:00
Remi NGUYEN VAN
74a87c1b2a Merge "Add framework-connectivity.impl" am: 0fcb8d6db4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635039

Change-Id: I9956c78228c2d04e20edf6fee1061861e26978b9
2021-03-18 03:33:42 +00:00
Chiachang Wang
0cefc1c20a Expose APIs for Settings
ConnectivityManager will be a part of incoming connectivity
mainline. Settings will no longer to access the hidden methods.
For those methods that accept the interaction from users, they
should be exposed as formal interface to allow the
functionality. Expose them to API surface.

Bug: 172183305
Test: make update-api
Change-Id: Id4533b94291766bb060af0091b5ccb81a00630fd
2021-03-18 11:18:56 +08:00
Remi NGUYEN VAN
1142754c99 Add framework-connectivity.impl
The library will be included in the connectivity module APEX when
migrating its sources out of framework-minus-apex.

Bug: 171540887
Test: m
Change-Id: I1595521eaced6e6997c076bb56b06ffdd22a4fa0
2021-03-18 00:29:08 +09:00