Commit Graph

13068 Commits

Author SHA1 Message Date
James Mattis
e8bae87a06 Merge changes from topics "pans", "pans-permission" am: 68658a18c7 am: 6e19867390 am: c4221b6a75
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1561317

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I20fdb2f06b473f9f92e62138e72bd30d4384a267
2021-02-14 09:51:16 +00:00
James Mattis
c4221b6a75 Merge changes from topics "pans", "pans-permission" am: 68658a18c7 am: 6e19867390
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1561317

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8afdee99c0b0813d3e3a61df053f9cdef966949c
2021-02-13 21:51:49 +00:00
James Mattis
6e19867390 Merge changes from topics "pans", "pans-permission" am: 68658a18c7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1561317

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I72035b6d5d6504cece1df472ae317e865ceb7882
2021-02-13 21:14:48 +00:00
James Mattis
68658a18c7 Merge changes from topics "pans", "pans-permission"
* changes:
  Marking setOemNetworkPreference as @SystemApi
  Adding permission for OEM managed preferences
  Implementation of setOemNetworkPreference
2021-02-13 20:54:57 +00:00
Yan Yan
3d818137f3 Merge changes Ifc8ad902,I6d1b8d0e am: 87c6253518 am: 66b74e588b am: 913569d3e5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1453730

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6f3235dd38e4c4912f986cbb27867ff14fe38e81
2021-02-12 22:46:32 +00:00
Yan Yan
913569d3e5 Merge changes Ifc8ad902,I6d1b8d0e am: 87c6253518 am: 66b74e588b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1453730

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If7bedd741266a08bf2eef515f1fb72a9aebc74e3
2021-02-12 22:12:07 +00:00
Yan Yan
66b74e588b Merge changes Ifc8ad902,I6d1b8d0e am: 87c6253518
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1453730

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I12bd81925142b20a04448952de67cb72d77b4ccd
2021-02-12 21:41:59 +00:00
Yan Yan
87c6253518 Merge changes Ifc8ad902,I6d1b8d0e
* changes:
  [API] Expose IpSecTunnelInterface#setUnderlyingNetwork
  Update underlying network of IpSecTunnelInterface
2021-02-12 21:23:29 +00:00
Treehugger Robot
e0ad927a21 Merge "Stop using Slog in QosCallbackTracker." am: 3b78cadc29 am: 55db18c16b am: a62a0be37d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1585567

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie04d9930a56f305e1292c682d9c28a2e8f95a811
2021-02-12 06:13:22 +00:00
Treehugger Robot
a62a0be37d Merge "Stop using Slog in QosCallbackTracker." am: 3b78cadc29 am: 55db18c16b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1585567

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I25baa31f1d7d148a78e29ae46a152b6b5e245d0b
2021-02-12 05:48:35 +00:00
Treehugger Robot
55db18c16b Merge "Stop using Slog in QosCallbackTracker." am: 3b78cadc29
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1585567

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6df42ce17addb1f433eba440ba4593b2e4ca57e5
2021-02-12 05:18:13 +00:00
James Mattis
7a25354727 Marking setOemNetworkPreference as @SystemApi
Marking setOemNetworkPreference in ConnectivityManager as @SystemApi.

Bug: 176496438
Bug: 176494815
Test: atest FrameworksNetTests
atest FrameworksNetIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: I4681c88dc3a83f71c387b29610c33594e57cb43f
2021-02-11 20:38:21 -08:00
James Mattis
981865c88f Adding permission for OEM managed preferences
Adding CONTROL_OEM_PAID_NETWORK_PREFERENCE as a signature level
permission to allow an application to control OEM managed network
preferences.

Bug: 176496438
Bug: 176494815
Test: atest FrameworksNetTests
atest NetworkStackTests
atest FrameworksNetIntegrationTests
atest NetworkStackIntegrationTests
atest CtsNetTestCasesLatestSdk
Change-Id: Iee13e89f3931c7079c2d88cb57b249b1b1cf93ad

Change-Id: Id29cafe1eaf5dff8a0605cb2579204d9c77b7e70
2021-02-11 20:38:21 -08:00
James Mattis
6e6fabf657 Implementation of setOemNetworkPreference
Main implementation of ConnectivityService.setOemNetworkPreference. This
covers the main requirements of this method including listener
functionality.

Bug: 176495594
Bug: 177101287
Bug: 176494815
Test: atest FrameworksNetTests
atest NetworkStackTests
atest FrameworksNetIntegrationTests
atest NetworkStackIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: I8d318ab07785e52dd84d6261fdea8f318dce9bc5
2021-02-11 20:38:18 -08:00
Treehugger Robot
3b78cadc29 Merge "Stop using Slog in QosCallbackTracker." 2021-02-12 04:03:12 +00:00
Lorenzo Colitti
aa5a8b2c6d Stop using Slog in QosCallbackTracker.
This is not public API. Use Log instead.

Test: m
Fix: 172050541
Change-Id: I281831431e2edcf9a3b77122ad8736b94aa8e215
2021-02-12 01:40:06 +00:00
Roland Levillain
c548da762e [automerger skipped] Merge changes from topic "int32ref" am: 8437d37bd0 am: 947f8c8acf am: 541fc05fd4 -s ours
am skip reason: Change-Id I9b63146ae563ed977f3112c9910f7a7c575de0b8 with SHA-1 9067134008 is in history

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8cfca5ee873f7b1eb8bba76d63af6b66b0f453e4
2021-02-11 13:28:00 +00:00
Roland Levillain
541fc05fd4 Merge changes from topic "int32ref" am: 8437d37bd0 am: 947f8c8acf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566390

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8511efa59e8d8617f48d62ee52d9e7ae15458253
2021-02-11 13:06:09 +00:00
Roland Levillain
947f8c8acf Merge changes from topic "int32ref" am: 8437d37bd0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1566390

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I86dde2fef971759b4720cfb242e8954baacf9d84
2021-02-11 12:43:56 +00:00
Roland Levillain
8437d37bd0 Merge changes from topic "int32ref"
* changes:
  [Mainline] android.system package APIs migration
  Use public android.system.Int64Ref instead of Int32Ref which is hidden (CorePlatformApi) type of libcore
2021-02-11 12:05:36 +00:00
Yan Yan
00387a2654 Update underlying network of IpSecTunnelInterface
Bug: 169855650
Test: atest IpSecManagerTunnelTest
Change-Id: I6d1b8d0e49f89c67ddc2caf4ba63fb0b1eb062c0
2021-02-10 14:51:43 -08:00
Roland Levillain
81960ab4a6 Merge changes from topic "cherrypick-android_util-a0ae5zk4cb" into sc-dev
* changes:
  [Mainline] android.system package APIs migration
  Use public android.system.Int64Ref instead of Int32Ref which is hidden (CorePlatformApi) type of libcore
2021-02-10 18:23:48 +00:00
Serik Beketayev
9067134008 [Mainline] android.system package APIs migration
By removing Int32Ref.

Bug: 179703584
Bug: 177619520
Test: mma
Change-Id: I9b63146ae563ed977f3112c9910f7a7c575de0b8
Merged-In: I9b63146ae563ed977f3112c9910f7a7c575de0b8
(cherry picked from commit 1a2d570c3a7122940097aa7e983a7240d163c41a)
2021-02-10 18:23:22 +00:00
Hai Shalom
f578bf4914 Merge "Support for Terms & Conditions notification" am: 67bb51ec40 am: fed30f42e8 am: b5a72aa56d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1557451

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0a47d12f41b9247910078ec8d6cd6e1f1589956e
2021-02-10 16:55:42 +00:00
Hai Shalom
b5a72aa56d Merge "Support for Terms & Conditions notification" am: 67bb51ec40 am: fed30f42e8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1557451

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I233420be11a45376bb6771389e440fcd92c94fb5
2021-02-10 16:32:46 +00:00
Hai Shalom
fed30f42e8 Merge "Support for Terms & Conditions notification" am: 67bb51ec40
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1557451

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibabb4e549706c5ab263aab9df78c9e5a0bff95de
2021-02-10 15:40:25 +00:00
Hai Shalom
67bb51ec40 Merge "Support for Terms & Conditions notification" 2021-02-10 15:36:58 +00:00
Serik Beketayev
13279169ae [Mainline] android.system package APIs migration
By removing Int32Ref.

Bug: 177619520
Bug: 179703584
Test: mma
Change-Id: I9b63146ae563ed977f3112c9910f7a7c575de0b8
Merged-In: I9b63146ae563ed977f3112c9910f7a7c575de0b8
(cherry picked from commit 63be51447826b077a1048901bb1aa73adb321ee1)
2021-02-10 12:34:46 +00:00
Lorenzo Colitti
6c9655f273 Merge changes from topics "vpnmove-getconnectionowneruid", "vpnmove-systemdefaultcallback", "vpnmove-vpntransportinfo" am: 5e21b83410 am: 5eac15c044 am: 22b1c63d51
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1572981

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I961b6442d53c1cb00af642866b7e49d151a9ab1e
2021-02-10 07:46:14 +00:00
Lorenzo Colitti
22b1c63d51 Merge changes from topics "vpnmove-getconnectionowneruid", "vpnmove-systemdefaultcallback", "vpnmove-vpntransportinfo" am: 5e21b83410 am: 5eac15c044
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1572981

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If16c695f15a12615811545836b4117225097d6a4
2021-02-10 07:20:26 +00:00
Lorenzo Colitti
5eac15c044 Merge changes from topics "vpnmove-getconnectionowneruid", "vpnmove-systemdefaultcallback", "vpnmove-vpntransportinfo" am: 5e21b83410
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1572981

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I83b4210780cf87006be5f55439ade06cd7893530
2021-02-10 06:55:56 +00:00
Lorenzo Colitti
5e21b83410 Merge changes from topics "vpnmove-getconnectionowneruid", "vpnmove-systemdefaultcallback", "vpnmove-vpntransportinfo"
* changes:
  Stop using mVpns in getConnectionOwnerUid.
  Add a VpnTransportInfo object.
  Add a registerSystemDefaultNetworkCallback method.
2021-02-10 06:38:41 +00:00
Lorenzo Colitti
bd015f4861 Stop using mVpns in getConnectionOwnerUid.
Use data that is already available in ConnectivityService
instead.

The behaviour of the new implementation is slightly different
from Q and R code when the permission check fails.

- The old code would throw a SecurityException if an app that
  was not an active VPN called the method, and would return
  INVALID_UID if the connection belonged to a UID that was not
  subject to the VPN.
- The new code returns INVALID_UID in both cases.

This does not seem like a compatibility problem. The only case in
which the code throws SecurityException is if the app is not a
current VPN app, but the app already knows whether it is or not.
The docs don't mention that the method SecurityException, either.

Bug: 173331190
Test: atest FrameworksNetTests
Test: atest HostsideVpnTests
Change-Id: If3d031e74df33b5c97e12ebf02272faac6769d50
2021-02-10 02:52:16 +09:00
Lorenzo Colitti
523b5e8405 Add a VpnTransportInfo object.
This currently stores the VPN type and a session name, but can be
extended in the future.

Bug: 173331190
Test: added coverage in VpnTest
Test: added coverage in ConnectivityServiceTest
Test: added coverage in NetworkAgentTest
Change-Id: I450858a9fa332c8d896dbdb4c14337d5ec23677f
2021-02-10 02:52:16 +09:00
Lorenzo Colitti
80b48bc589 Add a registerSystemDefaultNetworkCallback method.
This method allows internal components to track the system
default network. This differs from registerDefaultNetworkCallback
because that method sends callbacks for the default network for
the UID that called it. This may not be the system default
network, for example, when a VPN is up and applies to the UID.

Bug: 173331190
Test: new unit tests in ConnectivityServiceTest
Test: new unit tests in ConnectivityManagerTest
Test: new CTS tests in ConnectivityServiceTest
Test: new CTS tests in HostsideVpnTests in other CL in this topic
Change-Id: Id02748a2183f71b71ff2a53a580466b9dcecaa93
2021-02-09 20:58:28 +09:00
Junyu Lai
6251da61be Merge changes from topic "removeNI" am: c60c7b4df8 am: c62d1e3b0c am: ecac1d2479
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536707

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3553ff41d85f44c481ea065e6cbda5d286f9e1fa
2021-02-09 05:49:15 +00:00
Junyu Lai
ecac1d2479 Merge changes from topic "removeNI" am: c60c7b4df8 am: c62d1e3b0c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536707

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iec45cb7f553f08e4e3ec91827964a8eec8f96a91
2021-02-09 05:00:28 +00:00
Junyu Lai
c62d1e3b0c Merge changes from topic "removeNI" am: c60c7b4df8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536707

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia7c6e3bf8f10b98fc2c4d83d41e65c64737753f0
2021-02-09 04:26:28 +00:00
Junyu Lai
c60c7b4df8 Merge changes from topic "removeNI"
* changes:
  [FUI07] Stop making NetworkState with NetworkInfo from external callers
  [FUI06] Stop using NetworkInfo in NetworkState from external callers
2021-02-09 03:37:59 +00:00
Junyu Lai
db59cf7731 Merge "[VCN07] Bypass VCN for non-internet app accessible cellular services" am: f1d8c34877 am: f3e868f4d0 am: e9fe15bfe1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1549817

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I915ba6692ebae6ae09429d515ef612fdd48590f8
2021-02-08 22:37:06 +00:00
Junyu Lai
e9fe15bfe1 Merge "[VCN07] Bypass VCN for non-internet app accessible cellular services" am: f1d8c34877 am: f3e868f4d0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1549817

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4ad38ac5450b06da70f9fd329d79014e352e1656
2021-02-08 22:23:16 +00:00
Junyu Lai
f3e868f4d0 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
2021-02-08 22:09:54 +00:00
Roshan Pius
8e9626ed47 Merge "ConnectivityService: Plumb attribution tag for location permission checks" am: 482b2dda4f am: cef5161a27 am: bd0120da19
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1534625

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I72340de13e04640935403d282a1d9f5afe0536e6
2021-02-08 21:40:29 +00:00
Junyu Lai
f1d8c34877 Merge "[VCN07] Bypass VCN for non-internet app accessible cellular services" 2021-02-08 21:40:09 +00:00
Hai Shalom
7fcd18ae0b 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
2021-02-08 12:05:20 -08:00
Roshan Pius
bd0120da19 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
2021-02-08 19:45:03 +00:00
Roshan Pius
cef5161a27 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
2021-02-08 19:26:46 +00:00
Roshan Pius
c97d806148 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
2021-02-08 08:13:48 -08:00
junyulai
aabc564902 [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
2021-02-08 21:58:02 +08:00
junyulai
dddf2b6a02 [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
2021-02-08 21:40:49 +08:00