655405 Commits

Author SHA1 Message Date
Etienne Ruffieux
720d74c835 Merge "Make BluetoothCodecConfig and BluetoothCodecStatus public." 2021-12-06 15:16:44 +00:00
Hao Ke
e214082cb0 Set default ClassLoader for Parcel readSerializable API.
Set the default ClassLoader for the readSerializable(ClassLoader,
Class) API, when the ClassLoader parameter is null.

Doing so could enhance the security of Parcel deserialization,
as it would prevent resolving the Serializable class using unexpected
ClassLoaders.

Test: atest -d android.os.cts.ParcelTest
Bug: 195622897
Change-Id: I6da4b4f817c33e4464d90d1e9775b54793835c92
2021-12-06 14:34:03 +00:00
Bernardo Rufino
e3d8a1a299 Deprecate unsafe Parcel.readParcelableArray(ClassLoader)
Forgot this one.

Test: Builds
Bug: 195622897
Change-Id: Ia258f77fd2e706d2071c853c20d6ec3baa170a1f
2021-12-06 13:40:08 +00:00
Rhed Jao
63fed23659 Merge "Fix the typos on the java doc" 2021-12-06 07:19:52 +00:00
Jinyoung Jeong
0b1a783da6 DelegateRegistrationState Improvement
adding new states for DelegateRegistrationState:
 - DEREGISTERING_REASON_LOSING_PDN
 - DEREGISTERING_REASON_UNSPECIFIED

Bug: b/201522903, b/206557578
Test: atest CtsTelephonyTestCases:SipDelegateManagerTest
Change-Id: I3675c10a6dba55a49174509796c53b07b929c14f
Merged-In: I3675c10a6dba55a49174509796c53b07b929c14f
2021-12-06 03:55:54 +00:00
Qasim Javed
6a7bc39edf Add BluetoothLeBroadcast profile API.
Implementation for the APIs will be added later.

Bug: 205174140
Bug: 208222281
Tag: #feature
Test: gd/cert/run

Change-Id: I8781be89cba45a6e7a76fec7df24790a9f02d6a6
2021-12-05 19:45:08 -08:00
Jinyoung Jeong
b6518929e6 IMS RCS API Improvements-DelegateRegistrationState
Bug: b/197892699, b/202202874, b/203405794
Test: atest CtsTelephonyTestCases:SipDelegateManagerTest
Change-Id: Icfa7fd363ad4f9ad0131d78602c264742cd1785f
Merged-In: Icfa7fd363ad4f9ad0131d78602c264742cd1785f
2021-12-06 02:33:30 +00:00
Lucas Lin
70be96ffbf Merge "Update the transport types of metrics" 2021-12-06 01:54:54 +00:00
Sudheer Shanka
67d3dd83ff Fix NetworkPolicy logs in dumpsys.
Right now, nothing is get logged due to an issue
with NetworkPolicyLogger.Data initialization.

Bug: 209236326
Test: adb shell dumpsys netpolicy
Change-Id: Ie0c3e3831802f317c5821676d426ff29a8bb5fa5
2021-12-04 23:05:19 -08:00
Evgenii Stepanov
8895ef1256 Pass MTE RuntimeFlags to AppZygote.
Fix AppZygote process and its children (the actual service processes)
ignoring android:memtagMode attribute in the app manifest.

When starting a new AppZygote process, apply memtag-related flags as
determined by the app manifest (and modified by compat features and
actual h/w capabilities). If this is not done, MTE is always disabled in
an AppZygote process, which makes it impossible to enable it in the
AppZygote's children.

This change has no effect unless MTE is supported in the hardware
(ARMv9) and enabled in the system.

Bug: 207557677
Test: CtsTaggingHostTestCases
Change-Id: I8805958545fd790e4ca857184b749a21e58d68cd
2021-12-03 17:20:05 -08:00
Treehugger Robot
4746631ed1 Merge "Allow flag-guarded Java optimizations for services" 2021-12-04 01:07:34 +00:00
Hao Ke
93b3eb84ec Merge "Added End-of-Parcel check API." 2021-12-03 23:54:12 +00:00
Guang Zhu
7d6a7c5f0e use test app's data folder as filter directory
During a retry, test methods to be retried are written into a
file, pushed onto device and read by the test instrumentation
for execution.

The default location for such filter file is /data/local/tmp,
which is prohibited for access by system uid packages, such
as the system UI tests package.

This change uses the test app's data folder for filter: this
is not generally applicable for all the tests since root
permission is required, but it is a relatively safe assumption
in case of testing against system uid pakcages since it
implies userdebug build is being used.

Bug: 152001555
Fixes: 208473429
Test: http://go/forrest-run/L76200000952166377
Change-Id: Ifc268a1cdb94ff8e47b6bd323464deb28e0c20ea
2021-12-03 15:29:32 -08:00
Etienne Ruffieux
7121cd7fa5 Make BluetoothCodecConfig and BluetoothCodecStatus public.
Made BluetoothCodecConfig and BluetoothCodecStatus public,
added Builder to BluetoothCodecConfig, added accessor for
SOURCE_CODEC_TYPE_MAX and changed Arrays returns to List.

Tag: #feature
Bug: 200202780
Bug: 170678351
Test: BluetoothCodecConfigTest & BluetoothCodecStatusTest
NoNonSdkCheck: Only user actually requested the changes
Change-Id: Ic61b7087f53f45781f7e0eecca8b6d983093a22d
2021-12-03 23:08:50 +00:00
Rambo Wang
11f136cc06 Merge "Un-deprecate TelephonyManager SIM access APIs" 2021-12-03 22:40:50 +00:00
Treehugger Robot
808e0a5e7a Merge "ANDROID: Fix EventLog string class problem in ViewRootImpl#enqueueInputEvent()" 2021-12-03 22:05:19 +00:00
Benedict Wong
4bfa0ebc53 Merge "Immediately tear down VCN network when entering Airplane Mode" 2021-12-03 21:26:06 +00:00
Jared Duke
4514bdf1b7 Allow flag-guarded Java optimizations for services
Introduce a set of optional Java optimization and shrinking settings for
system server, based on the Soong variable added in aosp/1896612.
Opting in to optimizations can be achieved with either:
  * Env:
export SYSTEM_OPTIMIZE_JAVA=true
  * Make:
$(call add_soong_config_var_value,ANDROID,SYSTEM_OPTIMIZE_JAVA,true)

Note that the initial Proguard configuration is extremely conservative.
Follow-up work will refine the rules to both allow additional shrinking
while avoiding developer friction and overhead when adding services and
dynamically loaded jars.

As these optimiations can change the resulting stack traces, a parallel
effort is working to simplify retracing of stack traces for more
accurate debugging and diagnostics. Additional stabiliation and testing
will occur before any effort to enable these optimizations by default
for specific targets. Also note that there are no plans to enable
obfuscation for any of these targets.

Preliminary results:
  * Conservative keep rules (this CL w/ opt-in flag):
    * services.jar (19MB -> 15MB)
    * services.odex (52MB -> 54MB) (mostly from increased inlining)
  * Refined keep rules (follow-up CL):
    * services.jar (19MB -> 12MB)
    * services.odex (52MB -> 45MB)

Bug: 203088572
Test: SYSTEM_OPTIMIZE_JAVA=true m (validate services.jar/odex change)
Change-Id: I4130233310323611f63cd9bfcc0646080cf95875
2021-12-03 12:31:30 -08:00
Treehugger Robot
1a9af383d6 Merge "Fix OWNERS for time protos" 2021-12-03 20:21:07 +00:00
Sooraj Sasindran
12c048e406 Merge "Add non dangerous read phone state permission" 2021-12-03 18:59:58 +00:00
Andrei Onea
95ecac506d Allow privapp permission allowlist in apex
Read priv-app permission allowlists from APEX file and warn if
they're in the /system partition instead.

Test: boots
Bug: 190375768
Change-Id: I37d6deb60f0dffb75dd634075cd95bcf7ddf9684
Merged-In: I37d6deb60f0dffb75dd634075cd95bcf7ddf9684
2021-12-03 18:19:00 +00:00
paulhu
dc8bde9ffa Stop using NSD_ON setting
NSD_ON setting has never been set since it created. Besides,
CTS tests assume that nsd service is always enabled otherwise
the tests will fail. Thus, remove the setting from NsdService
which is no need to read/write it and it's also a hidden symbols.

Bug: 206702844
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: Id3cef7def96925cec5095e12910e9b97ba7efb11
2021-12-03 21:21:07 +08:00
Jakub Pawłowski
a859e86b5c Merge "Bluetooth: Pretty print LE Audio profile name in logs" 2021-12-03 10:29:20 +00:00
Neil Fuller
bff4c1b433 Merge "Add a setting to support for NITZ retention" 2021-12-03 09:36:52 +00:00
Ken Chen
2a5804e456 Merge "[NETD-BPF#6] Move bpf_shared.h from netd to module" 2021-12-03 08:15:06 +00:00
Rhed Jao
43509f3202 Fix the typos on the java doc
Correct "STMP" to "SMTP" in the java doc of the usesCleartextTraffic
attribute.

Bug: 181732244
Test: build
Change-Id: I7ffc81f3e201248f3b58dc5ee243a7cdd969fe23
2021-12-03 15:08:50 +08:00
chenchaoli
beb8f3f4b3 ANDROID: Fix EventLog string class problem in ViewRootImpl#enqueueInputEvent()
EventLog function can handle string,integer class and long class. (in android_util_EventLog.cpp)
    If menu title string are used bold tag(like <b>test</b>), it'll be android.text.SpannedString.
    therefore any android activity using tag menu string(like <b></b>) can be crashed by IllegalArgumentException.

    Bug: 208862322

Change-Id: I2432b0cd28c8f5fcb07cdf3e29560bf6b6c0f7b6
Signed-off-by: chenchaoli <chenchaoli@xiaomi.com>
2021-12-03 05:52:33 +00:00
Paul Hu
c0d2b740f0 Merge "Replace @hide APIs" 2021-12-03 02:10:45 +00:00
Benedict Wong
c0e108a497 Immediately tear down VCN network when entering Airplane Mode
This change immediately tears down the VCN network if all underlying
networks are lost, and the device is in airplane mode. This ensures
consistency where other components may not understand the lingering
behavior of the VCN network

Bug: 207014742
Test: atest FrameworksVcnTests
Change-Id: Ib05f0c4255e847eed7d8623b35c5a7dfedd920d6
2021-12-03 01:48:21 +00:00
Sooraj Sasindran
4219d77a4d Add non dangerous read phone state permission
Add non dangerous read phone state permission

Bug: 198535473
Test: CTS.
Change-Id: Ic6cbaf7113e09d618eb54e9f40fa033d803421c9
2021-12-02 17:06:47 -08:00
Treehugger Robot
00b14576ba Merge "Add DEVICE_LOCK permission to Shell to support ATS test" 2021-12-03 00:56:56 +00:00
Anthony Hugh
b4cce59e37 Add DEVICE_LOCK permission to Shell to support ATS test
Adds DEVICE_LOCK permission to Shell to support the
CarDevicePolicyManagerTest. This permission is needed to call
DevicePolicyManager#lockNow  which locks the device.

Bug: 187199256
Test: atest CarDevicePolicyManagerTest
Merged-In: I3fa20b53b929c97a6760d65b432a74c3415d6a08
Change-Id: I3fa20b53b929c97a6760d65b432a74c3415d6a08
2021-12-02 23:49:22 +00:00
Treehugger Robot
56f6d8d8a9 Merge "Allow modify phone state permission" 2021-12-02 23:18:17 +00:00
Sooraj Sasindran
2031ed6e77 Allow modify phone state permission
Allow modify phone state permission to access
isDataEnabled

Bug: 205599503
Test: build.
Change-Id: Iee0d3af863b9d0d24cafd55df2b645f216c7237a
2021-12-02 21:28:17 +00:00
Hao Ke
f75e459db0 Merge "Deprecate unsafe readParcelableList API." 2021-12-02 21:17:21 +00:00
Yan Yan
8d6d8dcc4f Merge changes I5cd2982f,Ia7f44c5f
* changes:
  Support configuring VcnUnderlyingNetworkPriority in VcnGatwayConnectionConfig
  Create VcnCellUnderlyingNetworkPriority
2021-12-02 19:17:33 +00:00
Treehugger Robot
51fae20957 Merge "Create a new key to backup Sim-specific data." 2021-12-02 19:16:07 +00:00
Treehugger Robot
e3a84af1a7 Merge "Check for initialization of mUpdateEngine" 2021-12-02 18:44:59 +00:00
Jakub Pawlowski
6525f0d6b9 Bluetooth: Pretty print LE Audio profile name in logs
Bug: 159786353
Change-Id: I1157a34fa91883a861ff0573431009823c2cd8b1
2021-12-02 19:13:15 +01:00
Jack Nudelman
5dff75b3d6 Create a new key to backup Sim-specific data.
Bug: b/206309441
Test: b/206986278
Change-Id: I84b42690f8dd3de0cbd795cc13dd5f9ab5a7a725
Merged-In: I84b42690f8dd3de0cbd795cc13dd5f9ab5a7a725
2021-12-02 18:05:33 +00:00
Hao Ke
d117f6f6d5 Added End-of-Parcel check API.
Added End-of-Parcel check API, that verifies there are no
bytes left to be read on the Parcel.

Test: atest -d android.os.cts.ParcelTest#testEnforceNoDataAvail
Bug: 195622897
Bug: 204990745
Change-Id: I3068568d8d4371b071aecd357adeb45a2d7103e4
2021-12-02 16:16:54 +00:00
Hao Ke
aa4e9dfda8 Deprecate unsafe readParcelableList API.
Deprecate unsafe parcel APIs and point to the safer ones that take the
expected type as parameter. Also mentioned the typed ones
that take the creator as argument since those are also more performant.

Test: Builds
Bug: 195622897
Bug: 199275680
Bug: 205985058
Change-Id: I77a1a925d8759fd122936780587e3488705d4c56
2021-12-02 15:43:40 +00:00
Patty
ae425ca614 Parse audio config codec capability for LE devices
1. Rename function getHwOffloadEncodingFormatsSupportedForA2DP
    to getHwOffloadFormatsSupportedForBluetoothMedia
 2. Add audio format for LC3
 3. Add public class BluetoothLeAudioCodecConfig to store the
    codec for LE audio
 4. Add test case for BluetoothLeAudioCodecConfig

Tag: #feature
Bug: 203535499
Bug: 150670922
Test: atest BluetoothLeAudioCodecConfigTest BluetoothInstrumentationTests
Change-Id: I5f64d9078ca2c07e13cffd83b879dd95468ed313
Merged-In: I5f64d9078ca2c07e13cffd83b879dd95468ed313
2021-12-02 21:59:26 +08:00
Thiébaud Weksteen
ae4bf7dda6 Add @JavaOnlyStableParcelable to AttributionSource
Annotate AttributionSource with @JavaOnlyStableParcelable as it is
already available as part of the SDK.

Bug: 197828948
Test: atest --host aidl_unittests
Change-Id: I3e9343030947404239c9a963a529d246c57a04a1
2021-12-02 13:14:21 +11:00
Treehugger Robot
8d221843b7 Merge "Fix incorrect SID matching for bio prompts" 2021-12-02 01:26:15 +00:00
Paul Hu
32942299d3 Merge "Centralize nsd associated files" 2021-12-02 01:14:07 +00:00
Seth Moore
c78e369c4c Fix incorrect SID matching for bio prompts
The default value for canUnlockViaBiometrics, which determines if we
are able to show a bio prompt, is true. However, if there are 0
biometric authenticator IDs, then it's impossible for the user to
satisfy a bio prompt. In this case, we should set canUnlockViaBiometrics
to false.

The loop that is normally expected to invert canUnlockViaBiometrics was
never run in the case of 0 bio authenticator ids, so we mistakenly
let the crypto init operation succeed when we should have blocked it.

Bug: 188864794
Test: Manual, using sample app that displays a biometric prompt.
Change-Id: Ib95b0564aa098157718b8d4a45b11baa69dad71b
2021-12-01 14:59:24 -08:00
Tim Van Patten
6e2a6588aa Correctly call setGpuStats() for ANGLE/system driver
In GraphicsEnvironment, correctly indicate if the loaded driver is ANGLE
or the system driver. This allows the 'dumpsys gpu' command to have the
correct value in the angleInUse field.

Bug: b/154955572
Test: adb shell dumpsys gpu
Test: atest CtsAngleIntegrationHostTestCases
Change-Id: I6db466b796e216367b0a220e432067b9ae6f485b
2021-12-01 12:50:59 -07:00
Kelvin Zhang
8af2abfcc7 Check for initialization of mUpdateEngine
Bug: 207768409
Test: th

Change-Id: Idc702658ab542566d775b296f1e82b63b0c1c2a4
2021-12-01 10:56:34 -08:00
Yan Yan
fee736f47c Support configuring VcnUnderlyingNetworkPriority in VcnGatwayConnectionConfig
Bug: 206044122
Test: atest FrameworksVcnTests(new tests)
Test: atest CtsVcnTestCases
Change-Id: I5cd2982fcbfe5ce4ee36edb91f1f9f9b55d28d9a
2021-12-01 10:34:02 -08:00