660523 Commits

Author SHA1 Message Date
Riddle Hsu
2bd413125e Remove getProcessGroup usage in OomAdjuster
The returned value may not be the same as it was set. The invocation
was used to verify whether the schedule group is set by zygote. Since
most of time it is success and it is no harm to ignore the result
because the latest state can still be updated from oom-adj computation,
the check of getProcessGroup can be simply removed.

Bug: 211000005
Test: Record a trace during cold launching a top activity.
      The main thread priority should be 100 after attachApplication.
      And "adb shell cat /proc/$pid/task/$pid/cgroup" is top-app.
Change-Id: I282e124d8dc603efdef9b845e8ee6bb61585a6df
Merged-In: I282e124d8dc603efdef9b845e8ee6bb61585a6df
2021-12-21 14:30:00 +08:00
Xin Li
a201cdea9c Merge "Merge SP1A.211205.008" 2021-12-21 05:02:36 +00:00
Inseob Kim
1378981fc7 Remove reference to nonplat sepolicy
nonplat isn't supported since Android P.

Bug: 210536608
Test: build and boot
Change-Id: I90102358265c7de1aad34792fdfacddf1e5a0a04
2021-12-21 13:48:57 +09:00
lifr
084df308bd [DU02]Remove DevicePolicyManagerInternal from NetworkStatsAccess
NetworkStatsAccess is using DevicePolicyManagerInternal APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.

Bug: 207100745
Test: atest NetworkStatsAccessTest
Change-Id: I0802148050869d92e1f09d1d657034380029f236
2021-12-21 11:31:44 +08:00
Junyu Lai
6ff6240694 Merge "[MS10.1] Move multiplySafeByRational to NetworkStatsUtils" 2021-12-21 01:22:14 +00:00
Amy Gu
d5451fb370 Specify two item limit for EXTRA_CHOOSER_TARGETS and EXTRA_INITIAL_INTENTS
Change-Id: If3fdaabf8456cc99f4cf7819ec89b3901a7c74c6
2021-12-21 01:21:52 +00:00
Treehugger Robot
4548fa7275 Merge "Pbap use profileConnector, resolveSystemService api fix" 2021-12-21 00:58:16 +00:00
William Escande
a05cb45b0e Add SystemApi to AudioManager method
getHwOffloadFormatsSupportedForBluetoothMedia is convert to a SystemApi
for module only (only use in BT)

Change-Id: Iae212ff5fd2159198543c0b877c2e56e3aefdb7c
Test: Build
Bug: 190422401
Tag: #refactor
2021-12-21 00:51:38 +01:00
Xin Li
4932b0137f Merge SP1A.211205.008
Bug: 205056467
Merged-In: Id5cd4123f1bb7bdd85e564fc6997dfbc50652a5f
Change-Id: I2b614d13e18b8a03aaab041c058c1b2f0a21fcab
2021-12-20 14:13:38 -08:00
Treehugger Robot
8c4a3070cd Merge "Add jdduke@ to services/proguard.flags OWNERS" 2021-12-20 15:55:52 +00:00
Treehugger Robot
c9ed425df2 Merge "Fix for run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest" 2021-12-20 14:33:41 +00:00
Junyu Lai
851c168716 Merge "[MS05] Fix NetworkTemplate lint errors" 2021-12-20 11:54:10 +00:00
Junyu Lai
b241707f03 [MS10.1] Move multiplySafeByRational to NetworkStatsUtils
Since NetworkStats related code will be moved to the module.
multiplySafeByRational in the NetworkUtilsInternal cannot be
accessed after that. Thus, create another utils class that
will be moved with NetworkStats code and put the function
into it.

Test: atest NetworkStaticLibTests:com.android.net.moduletests.util.NetworkStatsUtilsTest
Bug: 204830222
Change-Id: I96f3ac02e57b7325ed53988285770f478dee529e
2021-12-20 09:12:13 +00:00
Junyu Lai
4703cffb5d [MS05] Fix NetworkTemplate lint errors
This change also defines some IntDef annotations that will
be used in the follow-up CLs.

Test: TH
Bug: 204830222
Change-Id: Iba5e714a1304fdfd154379415dcc5d0f9b7b1b29
2021-12-20 15:17:16 +08:00
Jiyong Park
dcb1e3b913 Explicit cast from android::Base::Errno to status_t
Previously, Result<T>.error().code() returned int and this was
convertible to status_t which is an alias of int.

However, this actually was type unsafe because the return type of
error().code() was actually mean to be that of errno. errno and
status_t are both int, but their meanings are very different.

To handle such problems, Result<T>.error().code() now returns
android::base::Errno which is a wrapper to errno, but not to other
int-based types like status_t and StatusCode.

Eventually, Result<T> used here should be changed into Result<T,
StatusT> where StatusT is a type-safe wrapper class to status_t that
implements the contract to be used as the error type in
android::base::Result.

Unfortunately, since the use of Result<T> is so wide spread, in this
change, I aim to only fix the build error in this CL.

Bug: 209929099
Test: m
Change-Id: Ic10ab8ed52f6827ba3ac6fb7d6e031585827562f
2021-12-20 13:43:26 +09:00
Aaron Huang
935cafbabe Make IpSecManager.DIRECTION_FWD @SystemApi
IpSecManager.DIRECTION_FWD is used by VcnGatewayConnection and
it will be not visible to platform after IpSec was moved into
Connectivity mainline module. Therefore, make DIRECTION_FWD
@SystemApi so that it can be used by VcnGatewayConnection.

Bug: 204153604
Test: FrameworksNetTests
Change-Id: I80dc2a5b4940504820cee0d8e2d2e59ef3fcca18
2021-12-19 02:44:24 +08:00
Mariusz Skamra
9537669523 gtbs: Add Generic Telephone Bearer Service support
Tag: #feature
Bug: 159786353
Sponsor: jpawlowski@
Test: build
Change-Id: I8264ade4b07df17fc0207437dfdcae7028cc20ff
2021-12-17 07:56:45 +00:00
Hyunho Shin
db0515696f Merge "API description changed." 2021-12-17 03:28:43 +00:00
Treehugger Robot
a39eb360db Merge "Remove allowBlocking from all BluetoothProfiles" 2021-12-17 02:01:13 +00:00
Hyunho
83d8141905 API description changed.
the api description changed to reflect what is expected to be done by the caller
Bug: b/210738734
Test: Build

Change-Id: I85cddad952cfb9f657b15c5c5e75bb0adc52188f
Merged-In: I85cddad952cfb9f657b15c5c5e75bb0adc52188f
2021-12-17 01:13:50 +00:00
Jack Yu
f705cb8db6 Added a new network capability MMTEL
Added NET_CAPABILITY_MMTEL to indicate a network
support MMTEL (Multimedia telephony). This is for
IMS service to request an IMS network that supports
voice or PS (VoPS for 4G, VoNR for 5G).

Bug: 210774375
Test: atest ConnectivityServiceTest
Change-Id: I2c7b291fee3450f588a282f7a252c183c374becf
(cherry picked from commit 1e6438b43a13c27d0f939ec417dc0a84597fe935)
2021-12-16 22:55:52 +00:00
Jack Yu
09c6189ae4 Added setup/tear down data support
1. Added setup data network support.
2. Hook validation status down to data stall recovery manager.
3. Prelimanary changes before removing TransportManager.
4. Added tear down network support.
5. Added initial attach APN support.
6. Added set data profiles at modem support.

Bug: 196597630
Test: atest DataNetworkControllerTest DataProfileManagerTest DataProfileTest DataNetworkTest
Merged-In: I837606d9e91339c66f2e2cff1a3a76d1029750c6
Change-Id: I837606d9e91339c66f2e2cff1a3a76d1029750c6
(cherry picked from commit 69af77931e347c73ce2975e0ee54c5150a41203f)
2021-12-16 14:47:05 -08:00
Etienne Ruffieux
70d456d06c Merge "Moved AttributionSource related APIs in AttributionSource" 2021-12-16 21:16:58 +00:00
Treehugger Robot
d089108eac Merge "Remove unused import in IpSecAlgorithm" 2021-12-16 20:45:17 +00:00
Treehugger Robot
a7ab25609e Merge "Add mock modem service operations in Telephony" 2021-12-16 20:20:09 +00:00
Henry Fang
525fc0dccb Merge "TvProvider API standardization for ARIB and DVB TvProvider" 2021-12-16 19:34:31 +00:00
Hui Wu
d628edb425 Merge "Adding owners in cloudsearch packages" 2021-12-16 19:33:49 +00:00
Hunter Knepshield
d54e1126ab Merge "Create CarrierPrivilegesListener callback." 2021-12-16 19:00:24 +00:00
William Escande
6b5464ca69 Remove allowBlocking from all BluetoothProfiles
Since Bluetooth is becoming a mainline module, it can no longer call the
allowBlocking hidden api.
Instead, all interface are moved to be oneway and use a synchronous data
to handle the return value.

Bug: 200200870
Test: Build + start Bt and play something on speaker
Tag: #refactor
Merged-In: I776a6322faadca1504bce24f2b6b041e756b6448
Change-Id: I776a6322faadca1504bce24f2b6b041e756b6448
2021-12-16 19:34:35 +01:00
Aaron Huang
b6c88d765e Remove unused import in IpSecAlgorithm
HexDump is an internal class which cannot be visible to mainline
module. Remove it since this is unused.

Bug: 204153604
Test: FrameworksNetTests
Change-Id: Ie65e7eff8464487719c3124005a097a500ba21c6
2021-12-16 17:36:10 +00:00
Steven Moreland
8581d27415 Merge "Binder: recycle Parcel in finally block" 2021-12-16 17:16:31 +00:00
Ayush Sharma
da37e0f471 Merge "Revert "Add APIs that allow to exclude routes from VPN"" 2021-12-16 15:01:30 +00:00
Ayush Sharma
487b2e645a Revert "Add APIs that allow to exclude routes from VPN"
Revert "Suppress NewApi warnings for @SystemApi -> public APIs"

Revert "Add VpnServiceBuilderShim for VpnService.Builder"

Revert submission 1551943-vpn-impl

Reason for revert: <DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=mainline_modules_x86_64-userdebug&lkgb=8007224&lkbb=8008168&fkbb=8007902 >, bug b/210979001
Reverted Changes:
I0e7aa077a:Add VpnServiceBuilderShim for VpnService.Builder
Ib12f5ab39:Suppress NewApi warnings for @SystemApi -> public ...
I59b9185cf:Unhide RouteInfo#getType and related fields
Ie5b62b2b2:Unhide IpPrefix(InetAddress, int)
I993a32d40:Add CTS tests for exclude VPN routes APIs
Ib24b2d3fb:Suppress NewApi warnings for @SystemApi -> public ...
Ic3b10464a:Add APIs that allow to exclude routes from VPN

Change-Id: I89209357ab4bb206d206adcf9fd6d3498ce6ef4c
BUG: 210979001
2021-12-16 14:40:13 +00:00
Treehugger Robot
8f4e057fa7 Merge "Remove isUnsafeBuild() from IpSecAlgorithm" 2021-12-16 14:16:50 +00:00
Xiao Ma
23b9aec38e Merge "Move Ethernet related files to f/b/packages/ConnectivityT." 2021-12-16 14:12:39 +00:00
Aaron Huang
da5df1a9d8 Merge "Remove NetdService usage from IpSecService" 2021-12-16 12:32:41 +00:00
Taras Antoshchuk
55f030225b Merge "Add APIs that allow to exclude routes from VPN" 2021-12-16 11:13:33 +00:00
Junyu Lai
7fee9dd710 Merge "[MS03] Remove ServiceNotFoundException hidden API usage" 2021-12-16 10:42:15 +00:00
jimsun
6fb25dc35a Add mock modem service operations in Telephony
Bug: 205101043
Bug: 203241555
Test: manual
Change-Id: I65127fc43c62b52e3efaa99d06bf77855aab7bb0
Merged-In: I65127fc43c62b52e3efaa99d06bf77855aab7bb0
2021-12-16 17:02:34 +08:00
Xiao Ma
dfed81ffde Move Ethernet related files to f/b/packages/ConnectivityT.
ethernet-service is going to be moved into Connectivity mainline module.
Move all ethernet related files in f/b/ to f/b/packages/ConnectivityT so
that it's easier to migrate these files to Connectivity module finally
after clearing the hidden API usages. Below files to be moved:

Ethernet framework related files:
    - EthernetManager.java
    - EthernetNetworkSpecifier.java
    - IEthernetManager.aidl
    - IEthernetServiceListener.aidl
    - ITetheredInterfaceCallback.aidl

Ethernet service related files:
    - IpConfigStore.java(EthernetConfigStore has dependency on the class)

For the ethernet-service related files, keep it as-is temproraliy and
fix the hiden API dependencies in f/opt/net/ethernet/. After this work
is done, then migrating the whole of ethernet folder to Connectivity
module completely.

This CL also fixes some minor errors of code style format to pass the
code style check.

Bug: 210586283
Test: build pass
      atest FrameworksNetTests
      atest EthernetServiceTests
Change-Id: Ib359d29d5221105f648bc4194c6d6dbe4cc6e3e5
2021-12-16 06:59:08 +00:00
Treehugger Robot
00d8163936 Merge "Add scan result logs." 2021-12-16 04:29:41 +00:00
Raymond Tiong
0a229569cb Adding mustPlayShutterSound to break Cam2 dependency on Cam1
This replaces the already deprecated field:
android.hardware.Camera.CameraInfo#canDisableShutterSound

Bug: 203461517

Test: tested in Camera CTS

Change-Id: I0a0c6a3d5346413074344a079500f1c30c4431d9
2021-12-16 04:25:55 +00:00
Rambo Wang
33acead6f6 Merge "Support subscription for CarrierService#onLoadConfig" 2021-12-16 04:10:31 +00:00
Andy Hung
71791c0e0c SoundPool: Clean up Stream::play_l logic for garbage collection
Test: soundpool_stress
Test: atest SoundPoolAacTest
Test: atest SoundPoolHapticTest
Test: atest SoundPoolMidiTest
Test: atest SoundPoolOggTest
Bug: 210682934
Change-Id: Ief7ff8415861570c0f2f817bfae7e88948d810c0
2021-12-15 19:40:10 -08:00
Hyundo Moon
e4a79de89e Merge "BluetoothGatt: Deprecate unsupported methods" 2021-12-16 01:35:46 +00:00
Steven Moreland
713c258edc Binder: recycle Parcel in finally block
If other types of exceptions happen here, we should still recycle the Parcel.

Bug: 207778694
Test: boot
Change-Id: I3375b87a674c45f8bc66848dfaf899497f5acaa8
2021-12-16 01:03:54 +00:00
Hunter Knepshield
18d9d9feb1 Merge "Create a convenience method to get the CarrierService package." 2021-12-16 00:50:44 +00:00
Devin Moore
bba4af8447 Use new AIDL IR interface for ConsumerIr service
Continue using the HIDL service if it is registered, otherwise use the
AIDL service.

Test: atest ConsumerIrTest VtsHalIrTargetTest hal_implementation_test
Bug: 205000342
Change-Id: I648aa765d14c4f5d4c862523a1bb69b2e7bc5cc1
2021-12-16 00:25:59 +00:00
Hui Wu
fa11d35357 Adding owners in cloudsearch packages
Bug: 210528288
Test: not needed as this is a meta file change
Change-Id: I6bbf9f350639ed53edb1643c937c8c55702ff254
2021-12-16 00:03:19 +00:00
Jared Duke
d098791d6e Add jdduke@ to services/proguard.flags OWNERS
This file is only used in optional optimized builds, and will likely
undergo significant churn in the coming weeks. Add jdduke@ as an
OWNER for this file only to help expedite review.

Bug: 210510433
Change-Id: I46d3dfa2d3fc56acd849aa93e3361ac3af5c1341
Test: N/A
2021-12-16 00:03:11 +00:00