660973 Commits

Author SHA1 Message Date
Etienne Ruffieux
74c56a05b2 Merge "Added SystemApi annotation to permission used in Bluetooth" 2022-01-13 09:14:43 +00:00
Treehugger Robot
23ba02e90e Merge "Fix module-lib incompatibilities file is not referenced" 2022-01-13 09:06:27 +00:00
lucaslin
7cb77f7347 Add constants of VpnManager events
Bug: 191413541
Test: N/A
Change-Id: I1db1419d701940ba74b59f61d510878f08e64c91
2022-01-13 08:19:14 +00:00
Eden Su
2bc805e26d Merge "Add carrier config for Visited Country FQDN" 2022-01-13 08:07:46 +00:00
Benedict Wong
92890dc5d6 Merge "Listen for individual subscription mobile data toggles" 2022-01-13 07:07:45 +00:00
Sooraj Sasindran
b8f7654bd3 Use builder to pass profile network preference
Use builder to pass profile network preference

Bug: 194332512
Test: CTS
Change-Id: I19360dcdda62d99290f21e4e9d127af4d1332fc7
2022-01-13 07:00:57 +00:00
Frank Li
eb22eb4e42 Merge "[DU01]Remove INetworkManagementService from NetworkStatsService" 2022-01-13 05:45:42 +00:00
Benedict Wong
073e1ac89b Expose entry/exit bandwidth criteria APIs for VCN templates
This change adds additional criteria for bandwidth in both the
upstream and downstream directions, ensuring that a minimum quality
bar can be guaranteed for VCN underlying networks. Both directions
support separate entry/exit criterion to allow for hysteresis.

Bug: 205343355
Test: atest FrameworksVcnTests
CTS-Coverage-Bug: 209498272
Change-Id: I61c8469380551e673d91f9a4428d21a40f164841
2022-01-13 05:44:56 +00:00
Treehugger Robot
d992ee2925 Merge "Add tagSocket/untagSocket NDK APIs" 2022-01-13 05:39:48 +00:00
Benedict Wong
ee22e0d57d Add minimum required bandwidth to network templates
This change adds a minimum required bandwidth to the VCN network
templates, ensuring that a minimum bar of throughput can be required of
underlying networks.

Bug: 211008106
Test: atest FrameworksVcnTests
Change-Id: I929428f75e5e543966a03061d13f300dd8b0956f
2022-01-13 05:35:50 +00:00
Treehugger Robot
8c93a72063 Merge "[Stability][Bugfix] Catch DeadObjectException in TCMS." 2022-01-13 03:53:09 +00:00
Aaron Huang
314e2b37f2 Add PolicyDirection InfDef annotation to IpSecManager
IpSec is going to be moved into Connectivity module and it needs to
use PolicyDirection annotation. Add PolicyDirection IntDef annotation
so that it can be used in the module.

Bug: 204153604
Test: FrameworksNetTests
Change-Id: Ib411d8c436d67574bfaf7f3aba43e5f31e7487e2
2022-01-13 10:43:54 +08:00
Ken Chen
3d83380b6f Remove QTagUid_ prefix from function names
QTagUid_tagSocketFd -> tagSocketFd
QTagUid_untagSocketFd -> untagSocketFd
QTagUid_setCounterSet -> setCounterSet
QTagUid_deleteTagData -> deleteTagData

Bug: N/A
Test: m
Change-Id: I4753cae7ed132e020c5ef8d155dfe2551a792d04
2022-01-13 10:22:31 +08:00
Benedict Wong
66896667a6 Listen for individual subscription mobile data toggles
This change ensures that the VCN listens for changes on a
per-subscription basis. In the DSDS case, the
Settings.Global.MOBILE_DATA toggles is insufficient, as the toggles for
individual subscriptions are changed instead of the global toggle.

Without this patch, the VCN may ignore changes in the user toggles, and
continue providing data service even after user data is disabled.
Similarly, it may fail to bring up a VCN when user data is re-enabled.

Bug: 214247774
Test: atest FrameworksVcnTests
Change-Id: I1e84c25f48eab90dca163eda809fc11d5d21bc31
2022-01-13 01:58:01 +00:00
Treehugger Robot
2e2a97c04b Merge "Make ACTION_SETTING_RESTORED SystemApi" 2022-01-13 01:36:05 +00:00
Junyu Lai
012a4bad21 [MS44.1] Add API to query tagged UID summary
Query tagged UID summary is currently needed by
StatsPullAtomService to collect tagged traffic statistics.
Add an Api via NetworkStatsManager to support this
functionality.

Test: atest NetworkStatsManagerTest
Bug: 204830222
Change-Id: Iaa54482a8109b56e66e829c5bec5a8a8f466641a
2022-01-13 01:01:46 +00:00
Rahul Sabnis
088a308127 Temporarily comment out usages of PropertyInvalidatedCache in Bluetooth code
while it is pending migration to module-utils

Tag: #feature
Bug: 210468958
Test: Manual
Change-Id: Iab59d235ca59fe2b5863fb4714eaccbc64fa915c
2022-01-12 16:56:12 -08:00
Phil Burk
1ffdb59839 Merge "MIDI: add philburk@google.com to an OWNERS file" 2022-01-13 00:28:05 +00:00
Treehugger Robot
c3e03c1c3d Merge "Return 0 instead of NULL for jlong" 2022-01-13 00:14:17 +00:00
Rambo Wang
9368bb8e83 Merge "Rethrow RemoteException in TelephonyRegistryManager" 2022-01-12 23:41:09 +00:00
Treehugger Robot
296fbccd6e Merge "[DU03]Remove INetworkStatsService from BatteryStatsImpl" 2022-01-12 19:33:52 +00:00
William Escande
543d84f6b2 Make ACTION_SETTING_RESTORED SystemApi
Because Bluetooth is going mainline, we need to remove call to hidden
API.
Intent.ACTION_SETTING_RESTORED and extra are currently hidden.
There is no known alternative, so this CL make them SystemApi.

Bug: 211851706
Test: Build + start bt
Tag: #refactor
Change-Id: I7a105946f075819f21b91a39bc37c6e167439bf4
2022-01-12 19:33:02 +00:00
Oliver Woodman
00990aab81 Merge "Update media owners" 2022-01-12 19:04:50 +00:00
Daeho Jeong
8fb49c7863 Add smart idle maintenance service
Added smart idle maintenance service in StorageManagerService, whose
goal is to determine when to trigger filesystem defragmentation while
keeping the best user experience as long as possible, and avoiding
hurting UFS lifetime.

Test: check smart idle maintenance log every hour
Bug: 202283480
Bug: 181079477
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: Ie7331aec45d62a59b28ca2806e34d6d45b6ffaf4
2022-01-12 10:54:50 -08:00
James Mattis
1f21e4acf4 Merge "Making NetworkCapabilities @NonNull" 2022-01-12 17:43:22 +00:00
Junyu Lai
2dbb177f31 Fix module-lib incompatibilities file is not referenced
Test: m module-lib-api-stubs-docs-non-updatable
      with module-lib/api/android-non-updatable-incompatibilities.txt
Bug: 197717846
Change-Id: I03343bfcf972bf3bb105d5249cb024ffb02d50f8
2022-01-12 17:41:37 +00:00
Colin Cross
d9fdc2cdd2 Return 0 instead of NULL for jlong
musl libc defines NULL as nullptr, which is explicitly allowed by
C++11.  nullptr_t cannot be implicitly cast to an integral type.
Return 0 instead.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Id83c1994a95cb105785c8ad902d2fe0589cb188d
2022-01-12 17:36:17 +00:00
Taras Antoshchuk
bc8f256721 Merge "Revert "Revert "Revert "Revert "Add APIs that allow to exclude r..."" 2022-01-12 15:27:30 +00:00
Ken Chen
846fd78c06 Calling NDK version of tagSocket/untagSocket
Calling NDK version of tagSocket/untagSocket from
android_server_NetworkManagementSocketTagger.cpp. This is required since
the file is going to be mainlined. The platform functions it calls must
be stable APIs.

Bug: 29761778
Bug: 202086915
Test: atest TrafficStatsTest NetworkUsageStatsTest

Change-Id: Ic6554d9b98cef9b41b7eae06315d284c574c0a45
2022-01-12 23:21:51 +08:00
Ken Chen
a4a35a92ea Add tagSocket/untagSocket NDK APIs
Provide native APIs to tag the various sockets used for network
transfer, which helps apps tracking down data usage inside their app.

We've had equivalent Java APIs since API level 14.
https://developer.android.com/reference/android/net/TrafficStats.html#tagSocket(java.net.Socket)
https://developer.android.com/reference/android/net/TrafficStats.html#untagSocket(java.net.Socket)

Given that these Java APIs are implemented in native side, providing
NDK APIs directly will be easier for native users to use it.

Bug: 29761778
Bug: 202086915
Test: Tests in change Ic6554d9b98cef9b41b7eae06315d284c574c0a45
Change-Id: I802ce62f82199ce087bf8feb03afb26de1ce526e
2022-01-12 23:21:17 +08:00
Etienne Ruffieux
7facfb2cd3 Added SystemApi annotation to permission used in Bluetooth
As the Bluetooth module will be built as an apex, we need
to remove all hidden API usages. BluetoothManagerService
is using MANAGE_BLUETOOTH_WHEN_WIRELESS_CONSENT_REQUIRED
so we need to expose it as SystemAPI

Tag: #feature
Bug: 211851706
Test: make
Change-Id: Ia9da9ddefc7e466f13a969a2877068ef97a032f9
2022-01-12 14:25:12 +00:00
Oliver Woodman
9352d2e58c Update media owners
Change-Id: I1afc15bbc0e897775e2eb477b71be6567e411f09
2022-01-12 12:17:41 +00:00
Treehugger Robot
19041e21ab Merge "Move PowerStatsLogger off of the main thread." 2022-01-12 11:05:16 +00:00
Treehugger Robot
b77890ae5e Merge "Pruning departed users from OWNERS" 2022-01-12 10:10:03 +00:00
lifr
ca904a8ea8 [DU03]Remove INetworkStatsService from BatteryStatsImpl
BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.

Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
            MobileRadioPowerCalculatorTest
CTS-Coverage-Bug: 213437796

  (cherry-picked from ag/16548638)

Change-Id: I584897ff8ba303c717a9df3756c9f6778c1cfb10
Merged-In: I584897ff8ba303c717a9df3756c9f6778c1cfb10
2022-01-12 07:28:55 +00:00
Treehugger Robot
ddcee937c1 Merge "gtbs: Add Generic Telephone Bearer Service support" 2022-01-12 07:05:02 +00:00
Thiébaud Weksteen
c4895c4aa6 Transition SerialManager to @EnforcePermission
Use the new @EnforcePermission annotation for SerialService.

Test: Manually inspect ISerialManager.java, the permission checks are
      correctly generated.
Test: Run SerialChat app as regular app, SecurityException triggered
      when launching the app.
Test: Run SerialChat as priv-app. Access is granted, the app executes
      normally.
Bug: 197828948
Change-Id: Ide1d2809f2226f7cd84efa0d364dc78da726f294
2022-01-12 16:26:09 +11:00
Benedict Wong
179826efdc Merge changes Ib7d51cf1,I92bd2831
* changes:
  Expose APIs to configure underlying network priority
  Update setter/getters to configure underlying network priority
2022-01-12 05:21:03 +00:00
Ray Essick
1feb6240ca Pruning departed users from OWNERS
Bug: 206221953
Test: n
Change-Id: I48f21abae63d418e27224db2ecf0cbc177ff4f17
2022-01-11 20:33:22 -08:00
Colin Cross
c1309ecfba Fix incorrect licenses in frameworks/base
SPDX-license-identifier-GPL and SPDX-license-identifier-W3C are
false positives in the detector in binary files.

libs/usb/test/accessorytest/f_accessory.h is an original kernel
header file with GPL 2.0 license. Replace it with the file from
libs/usb/tests/AccessoryChat/accessorychat/linux/usb/f_accessory.h,
which is the same header after running it through bionic's script
to remove copyrightable information from the header.

Move CPL license into test-runner/ and test-base/ where it is
used.

Test: m checkbuild
Change-Id: I09e760d02b3712d5a8d225ce4cff6515c9f3c5e1
2022-01-11 19:23:50 -08:00
Md Shahriar Hossain Sajib
f28ab362fc Merge "le advertisement address type settings" 2022-01-12 03:11:00 +00:00
Jean Chalard
649c2ea2d2 Merge "Add documentation about VpnProfile#setExcludeLocalRoutes" 2022-01-12 01:30:41 +00:00
Mariusz Skamra
b91b1c5139 gtbs: Add Generic Telephone Bearer Service support
Tag: #feature
Bug: 159786353
Bug: 213412267
Sponsor: jpawlowski@
Test: build
Change-Id: Iecd56b91ce59f6b014878691fe4c6fae826b73f9
2022-01-11 19:36:33 +00:00
Andy Hung
3c44833a91 Merge "SoundPool: Clean up Stream::play_l logic for garbage collection" 2022-01-11 17:49:55 +00:00
Wei Su
efa03939f0 Merge "Write files in a temporary directory" 2022-01-11 16:46:33 +00:00
Anton Hansson
faea0b39ec Merge "Generate genrule modules for merged api txts" 2022-01-11 16:35:50 +00:00
David Zeuthen
6fc37331a6 identity: Add multi-document presentation support.
This new PresentationSession interface enables an application to do a
multi-document presentation, something which isn't possible with the
existing API. As a practical example of this consider presenting both
your Mobile Driving License and your Vaccination Certificate in a single
transaction.

Also update the documentation for IdentityCredential to clarify that
the same AuthKey is used for multiple getEntries() calls on the same
credential.

Also deprecate existing IdentityCredential.getEntries() method and
related methods and classes.

Bug: 197965513
Test: New CTS tests and new screen in CtsVerifier
Change-Id: I74534969143882552407917a82f44d43da12711c
2022-01-11 10:40:51 -05:00
Rambo Wang
cabbfbab9e Rethrow RemoteException in TelephonyRegistryManager
Follows the best practice in
go/android-api-guidelines#rethrow-remoteexception, Rethrow
RemoteException as RuntimeException when system server crash to
ensure that apps don’t accidentally persist security or policy decisions

Bug: 210990980
Test: atest TelephonyRegistryManagerTest
Change-Id: I1656a2385590910c97660a270cae60ca754c8e3a
2022-01-11 15:39:39 +00:00
Chiachang Wang
b70a0862ff Merge "Only set excludeLocalRoutes in the bypassable VpnProfile" 2022-01-11 13:46:54 +00:00
Chiachang Wang
657656b460 Only set excludeLocalRoutes in the bypassable VpnProfile
fromVpnProfile() will be called in the system server directly.
If the input VpnProfile does not set excludeLocalRoute with a
bypassable VPN, it will crash system server. Thus, only set
the excludeLocalRoutes in the bypassable VpnProfile.

Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: I311cc7e3c46ab4f6721f477f227e76ba4c0712f6
2022-01-11 13:46:47 +00:00