Commit graph

13,045 commits

Message SHA1
Merge "[VCN07] Bypass VCN for non-internet app accessible cellular services" am: f1d8c34877
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1549817

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I304db5e46d8e76d7248b9dd1f42b43200635b2be

Junyu Lai   authored and   Automerger Merge Worker   commited 2021-02-08 22:09:54 +00:00
f3e868f4d0
Merge "[VCN07] Bypass VCN for non-internet app accessible cellular services"
Junyu Lai   authored and   Gerrit Code Review   commited 2021-02-08 21:40:09 +00:00
f1d8c34877
Support for Terms & Conditions notification
- Added API to add T&C URL in the CaptivePortalData class, and to
indicate if the source is from Passpoint.
- Added source indication for the Venue URL API.
- Allow the connectivity service to send a new T&C acceptance
notification.
- Updated the merge method to prefer the Capport data over the
network agent data, if the source is not authenticated (not from
Passpoint).
- Propagate the Venue Friendly name to the captive portal activity
to be used instead of SSID, when available.

Bug: 162785447
Test: End-to-end test
Test: atest ConnectivityServiceTest
Test: atest CtsNetTestCasesLatestSdk:CaptivePortalDataTest
Test: atest NetworkNotificationManagerTest
Change-Id: I4e77c3b6c01941b03c46ad32da70c77e0fecac64

Hai Shalom   commited 2021-02-08 12:05:20 -08:00
7fcd18ae0b
Merge "ConnectivityService: Plumb attribution tag for location permission checks" am: 482b2dda4f am: cef5161a27
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534625

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I656644b786bccbe03cdb93a37a0f47e12e5c330d

Roshan Pius   authored and   Automerger Merge Worker   commited 2021-02-08 19:45:03 +00:00
bd0120da19
Merge "ConnectivityService: Plumb attribution tag for location permission checks" am: 482b2dda4f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534625

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5150c4827d8d2a8154afdf4f7076846fe6e38630

Roshan Pius   authored and   Automerger Merge Worker   commited 2021-02-08 19:26:46 +00:00
cef5161a27
ConnectivityService: Plumb attribution tag for location permission checks
Not currently setting the atttribution tag for location
permission checks. Plumb the attribution tag for all location permision
checks (so that location access is correctly attributed to individual
components within an app)

Bug: 162602799
Test: atest android.net
Test: atest com.android.server
Change-Id: Iee95f05204f51a4f8cb1f36acfb60e8cdeb156f4

Roshan Pius   commited 2021-02-08 08:13:48 -08:00
c97d806148
[FUI15] Remove networkId in NetworkState
Follow-up from aosp/1542748. networkId is unused and it is
safe to remove them now.

Test: atest FrameworksNetTests NetworkPolicyManagerServiceTest
Bug: 174123988
Change-Id: Ifc9cdad79a3d772035c73116de3f64dd6237b747

junyulai   commited 2021-02-08 22:16:08 +08:00
7906a1c99a
[FUI07] Stop making NetworkState with NetworkInfo from external callers
Follow-up from previous patch. This change stop accessing the
constructor that needs NetworkInfo to create NetworkState, which
is no longer accessible after ConnectivityService become
mainline module. Instead, pass a legacy network type which is
dedicated for the need of the type.

Test: atest FrameworksNetTests NetworkPolicyManagerServiceTest
Bug: 174123988
Change-Id: I24157bc33e5a5819eccd6a3111d2049f531c1d43

junyulai   commited 2021-02-08 21:58:02 +08:00
aabc564902
[FUI06] Stop using NetworkInfo in NetworkState from external callers
This is achieved by:
  1. Use legacy network type inside NetworkState to replace the
     needs of referencing NetworkInfo.getType().
  2. Let getAllNetworkState only return networks with isConnected()
     equals true. This allows callers such as NPMS or NSS does not
     have to reference to NetworkInfo.isConnected().

Test: atest FrameworksNetTests NetworkPolicyManagerServiceTest
Bug: 174123988
Change-Id: I1c4eb08d18ca973eb8f41d06258872eabc0006b8

junyulai   commited 2021-02-08 21:40:49 +08:00
dddf2b6a02
Merge changes I4256ca5f,I91528e1a,I48bd594c am: 82c60d022d am: afa74de47d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1579985

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5304f83bc029582c2f903669270b713b1678431c

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-02-08 11:32:13 +00:00
909af3ded7
Merge "Move shared Proxy method and constants to shared lib" am: c42519e903 am: 067b92e2a7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1574816

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0a12cbd0101d6cc637f87e524713ba5056ac6e01

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-02-08 11:31:48 +00:00
ee026c93fb
Merge changes I4256ca5f,I91528e1a,I48bd594c am: 82c60d022d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1579985

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic761cd9e8e492bcbde117f2b7de7f995b93ea0e7

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-02-08 11:21:08 +00:00
afa74de47d
Merge "Move shared Proxy method and constants to shared lib" am: c42519e903
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1574816

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4c6ff3c4c82d12334b52871863cc7d6d5c6872c9

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-02-08 11:00:55 +00:00
067b92e2a7
Merge changes I4256ca5f,I91528e1a,I48bd594c
* changes:
  Change ConnectivityServiceTest to prepare for VPN code move.
  Add to VpnManager the VPN APIs used by Settings and SystemUI.
  Remove temporary hack in VpnTest.

Lorenzo Colitti   authored and   Gerrit Code Review   commited 2021-02-08 10:41:32 +00:00
82c60d022d
Merge "Move shared Proxy method and constants to shared lib"
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-02-08 10:27:05 +00:00
c42519e903
Move shared Proxy method and constants to shared lib
The static validate() method an PROXY_* constants in Proxy are
used by both module and Settings. After Proxy is moving into
connectivity module, Setting will not able to access them.
Thus, move them to ProxyUtils in net shared lib.

Bug: 172183305
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases:ProxyInfoTest
Change-Id: I02c88aeaeb53d62b87a42a2d8ead9b140b054650

Chiachang Wang   commited 2021-02-08 10:25:07 +00:00
0fcb9872b4
Remove unused INetworkManagementService from IpSecService
IpSecService is no longer using any methods of
INetworkManagementService, so remove it from IpSecService
and related files.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I852e3a534e0ffd26b4b22420754f3ec8a6f153ad

lucaslin   authored and   Lucas Lin   commited 2021-02-08 08:05:00 +00:00
631829a135
Use NetdUtils instead of NetworkManagementService in Vpn
NetdUtils has the same method(e.g. setInterfaceUp) as
NetworkManagementService so using the one inside NetdUtils instead
and try to remove NetworkManagementService from Vpn in
the following commit.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I867556478fbc8c8ca8baa4e4c438a47b3beebe39

lucaslin   commited 2021-02-08 16:03:19 +08:00
fbd613257d
Use NetdUtils instead of NetworkManagementService in IpSecService
NetdUtils has the same method(e.g. setInterfaceUp) as
NetworkManagementService so using the one inside NetdUtils instead
and try to remove NetworkManagementService from IpSecService in
the following commit.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I0ed8b0c678b067a655b51b938b6b40eadd985321

lucaslin   commited 2021-02-08 16:01:56 +08:00
f0561b8fb1
Merge "[VCN03] Linger the newly connected network for a short time" am: c5bd380f2b am: 733561ba51
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1527820

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I30d7e79a273436e49331a0cab285c03be32f5390

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-02-08 05:57:46 +00:00
d405f3a995
Merge "[VCN03] Linger the newly connected network for a short time" am: c5bd380f2b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1527820

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icabf50b92925fe3bcb5b45e40cc1c696c73e7380

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-02-08 05:19:15 +00:00
733561ba51
Merge "Create new system API in UserHandle to get uid" am: 2173785652 am: 59a29b670e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573942

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id31355ce04a22c27bb83793b5664a3f6358fd83d

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-02-08 05:14:09 +00:00
7bfad333ee
Merge "[VCN03] Linger the newly connected network for a short time"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-02-08 04:57:35 +00:00
c5bd380f2b
Merge "Create new system API in UserHandle to get uid" am: 2173785652
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573942

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia8303c08be1e76ff48e60965518de4d469dc0352

Chiachang Wang   authored and   Automerger Merge Worker   commited 2021-02-08 04:30:03 +00:00
59a29b670e
Merge "Create new system API in UserHandle to get uid"
Chiachang Wang   authored and   Gerrit Code Review   commited 2021-02-08 03:56:39 +00:00
2173785652
Merge "More cleanly separate requests and listens." am: b46257ecff am: 05bf3641ea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1565202

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iee85ef5889b9bd4ca72115499ac94c8abeb4feb2

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-02-07 19:08:37 +00:00
882630424c
Merge "More cleanly separate requests and listens." am: b46257ecff
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1565202

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia7ed944bb1c2b81dd3f6ff74c195a3bc5f22ea51

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-02-07 18:29:52 +00:00
05bf3641ea
Merge "More cleanly separate requests and listens."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2021-02-07 18:04:50 +00:00
b46257ecff
Change ConnectivityServiceTest to prepare for VPN code move.
No-op changes to make it easier to review the VPN code move.
1. Set underlying networks via MockVpn, not ConnectivityService.
2. Add a processBroadcastForVpn utility method that we can modify
   without too much churn when the code is moved.

Bug: 173331190
Test: test-only change
Change-Id: I4256ca5f33034ef9d1de79857795a6ed1d644e61

Lorenzo Colitti   commited 2021-02-07 20:40:52 +09:00
852baaab79
Add to VpnManager the VPN APIs used by Settings and SystemUI.
Settings and SystemUI use these through raw AIDL calls.
Make them proper manager calls so we can move the implementation
without touching the callers again.

For now these still call into ConnectivityService via
IConnectivityManager. In an upcoming CL the implementation will
move to VpnManagerService.

Test: m
Bug: 173331190
Change-Id: I91528e1ad9948fbaa1fc5e37c61c5eb95f54964e

Lorenzo Colitti   commited 2021-02-07 20:40:51 +09:00
ff49d2b2fa
Remove temporary hack in VpnTest.
This temporary hack was necessary due to b/175883995. Now that
that bug is fixed, remove the hack.

Bug: 171529940
Test: test-only change
Change-Id: I48bd594cf3a37575f4888c1be9a1cf535de2e4d2

Lorenzo Colitti   commited 2021-02-07 20:40:46 +09:00
a6e7006967
More cleanly separate requests and listens.
Currently, NetworkRequest has several types of requests (LISTEN,
TRACK_DEFAULT, REQUEST, BACKGROUND_REQUEST), and we expect more
to be added.

There are really three categories of request:
1. Requests satisfied by only one network and will keep that
   network up, and thus need to be sent to NetworkProviders:
   REQUEST, BACKGROUND_REQUEST.
2. Requests satisfied by only one network but will not keep that
   network up: TRACK_DEFAULT
3. Requests satisfied by multiple networks and will not keep any
   networks up: LISTEN.

Unfortunately the separation is not very clear. Currently, for
any valid request, either isListen() will return true or
isRequest() will return true. This makes it impossible to tell
whether a particular request should be sent to NetworkProviders,
so the current code sends TRACK_DEFAULT requests to
NetworkProviders as well. This is incorrect - a TRACK_DEFAULT
should never keep a network up, for example.

This CL attempts to clarify things by making isRequest() return
false for TRACK_DEFAULT requests and thus never sending them to
NetworkProviders. After this CL:

- isRequest will return true only for requests that attempt to
  bring up or keep up a network.
- isListen will return true only for requests that match multiple
  networks but do not keep any of them up.
- Neither will return true for TRACK_DEFAULT.

Test: atest ConnectivityServiceTest
Change-Id: I7aad30ade8f7ab2a179e53483d9afd8675f64a12

Lorenzo Colitti   commited 2021-02-07 18:20:59 +09:00
74d34ec687
Merge "Revert "[Mainline] Migrate android.utils package items"" am: 8115741902 am: bb9c442c90
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1579467

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0f4812a5404b1b63fae605406aa0b22e1a991ab3

Serik Beketayev   authored and   Automerger Merge Worker   commited 2021-02-07 04:14:35 +00:00
3eb2f4625d
Merge "Revert "[Mainline] Migrate android.utils package items"" am: 8115741902
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1579467

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I05e76b48f1e2ce22b04b5a05c0cb8a0fd71a103e

Serik Beketayev   authored and   Automerger Merge Worker   commited 2021-02-07 03:55:21 +00:00
bb9c442c90
Merge "Revert "[Mainline] Migrate android.utils package items""
Serik Beketayev   authored and   Gerrit Code Review   commited 2021-02-07 03:11:47 +00:00
8115741902
Revert "[Mainline] Migrate android.utils package items"
Revert submission 1553146-android_util

Reason for revert: Build Breakage aosp-master/db845c-userdebug @ 7128996
Reverted Changes:
Ia39f6e03f:[Mainline] Migrate android.utils package items
Iaf99140d6:[Mainline] Migrate android.utils package items

Change-Id: I5bdaec5d1a87436510c3e05fadaf0124d86b1bdf

Serik Beketayev   commited 2021-02-06 09:19:47 +00:00
5b49047760
Expose TEST_TAP_PREFIX as system API
TestNetworkManager is a part of connectivity mainline module and
it is already a system API, but its constant - TEST_TAP_PREFIX
is hidden, so expose it for the callers inside framework.

Bug: 172183305
Test: make update-api
Change-Id: I7fc08be4a6ca6325d5b576b761afda17865cefaa

lucaslin   authored and   Lucas Lin   commited 2021-02-06 09:11:05 +00:00
cf078167b7
Merge "[Mainline] Migrate android.utils package items" am: 2cb320d17b am: 002b5a72a0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552837

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I107d60d02b888e3ac5faa03b1b9dc6a8492e6d14

Serik Beketayev   authored and   Automerger Merge Worker   commited 2021-02-06 08:28:46 +00:00
09b3f4e417
Merge "[Mainline] Migrate android.utils package items" am: 2cb320d17b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552837

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I20f8a0ad33c592c799103d86f64e7755f54fa85a

Serik Beketayev   authored and   Automerger Merge Worker   commited 2021-02-06 07:26:16 +00:00
002b5a72a0
Merge "[Mainline] Migrate android.utils package items"
Serik Beketayev   authored and   Gerrit Code Review   commited 2021-02-06 07:00:12 +00:00
2cb320d17b
Merge changes Iabad7300,I85363e28 am: d86b977679 am: e2fc895c34
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1539241

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic22bfe536e8113ad721a32001911dc496221d871

James Mattis   authored and   Automerger Merge Worker   commited 2021-02-06 05:40:37 +00:00
9febeffaf7
Merge "[Mainline] Core Platform APIs migration" am: e205128f1f am: a774bdaacd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1546370

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic9075b5338d14a939bedb13fcb57fe4ee527d990

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-02-06 05:40:14 +00:00
cecb88898f
Merge changes Iabad7300,I85363e28 am: d86b977679
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1539241

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6ff19fad0ddb74c3eccd7fb7d16214e483a3b8a7

James Mattis   authored and   Automerger Merge Worker   commited 2021-02-06 05:14:28 +00:00
e2fc895c34
Merge "[Mainline] Core Platform APIs migration" am: e205128f1f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1546370

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If0007ea53f7c4b4c1bbd0d397b848fb951278ec9

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-02-06 05:04:31 +00:00
a774bdaacd
Merge changes Iabad7300,I85363e28
* changes:
  Stubbed setOemNetworkPreference in Connectivity
  Update OemNetworkPreferences to use 1:1 Map

James Mattis   authored and   Gerrit Code Review   commited 2021-02-06 04:33:51 +00:00
d86b977679
Merge "[Mainline] Core Platform APIs migration"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-02-06 04:11:00 +00:00
e205128f1f
[VCN03] Linger the newly connected network for a short time
This is mainly used by VCN, where VCN-eligible networks might
be registered before VCN management service can fire request
to prevent the newly created network from being torndown
immediately by ConnectivityService.

Test: atest ConnectivityServiceTest#testNewNetworkLingering
      atest ConnectivityServiceTest#testNewNetworkLingering_bgNetwork
      atest FrameworksNetTests --rerun-until-failure 20
Bug: 175180558
Change-Id: I7768daf4cf2d8f6d8057b5107412e06104ba82e0

junyulai   commited 2021-02-06 11:22:31 +08:00
f6d98ec185
Merge "Update VpnTest for new restricted API" am: 20507cf1f9 am: 1fb754cc9c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554177

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I76d0e305bbace9c41a1ca44bad660391bbe79297

Aaron Huang   authored and   Automerger Merge Worker   commited 2021-02-05 12:01:40 +00:00
4bec1c714d
Merge "Update VpnTest for new restricted API" am: 20507cf1f9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554177

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I47baf5985f00722b5be3402668cfe7ff4942e6d1

Aaron Huang   authored and   Automerger Merge Worker   commited 2021-02-05 11:22:34 +00:00
1fb754cc9c
Merge "Update VpnTest for new restricted API"
Aaron Huang   authored and   Gerrit Code Review   commited 2021-02-05 10:52:54 +00:00
20507cf1f9