Commit Graph

571662 Commits

Author SHA1 Message Date
Sarah Chin
fa565ffc48 Merge "Update constructors for IRadioData classes" 2021-10-06 19:03:08 +00:00
Jeff Sharkey
2885623021 Merge "Mark Soong maintainers as a last resort suggestion" 2021-10-06 14:14:06 +00:00
Liz Kammer
ff8e5c0c3f Mark Soong maintainers as a last resort suggestion
Soong having OWNERS in frameworks/base is useful to enable LSCs;
however, they shouldn't appear in review suggestions except as a
fallback.

Test: n/a
Change-Id: I86618b66e51893908478def9fc455a3dfde146f0
2021-10-06 09:15:46 -04:00
Treehugger Robot
3ad4ecc296 Merge "Avoid full unparcelling where possible in Bundle" 2021-10-06 12:06:59 +00:00
Sarah Chin
e3070d75e9 Update constructors for IRadioData classes
Test: atest FrameworksTelephonyTests
Bug: 198331673
Change-Id: I8480df1164548dde491c6ae6251bbc2725c3eadf
Merged-In: I8480df1164548dde491c6ae6251bbc2725c3eadf
2021-10-06 10:16:42 +00:00
Bernardo Rufino
fdd1771a4a Merge "Change defusing for lazy bundles" 2021-10-06 08:43:17 +00:00
Treehugger Robot
6a0afe1846 Merge "Fixing a build breakage caused by an incorrect link. Version code for Android T doesn't exist yet, removing the link." 2021-10-05 18:15:36 +00:00
Treehugger Robot
b721e9b48d Merge "media: use MediaProperties.resolution_limit_32bit()" 2021-10-05 17:13:35 +00:00
Jacob Hobbie
183e274d57 Fixing a build breakage caused by an incorrect link. Version code for
Android T doesn't exist yet, removing the link.

Test: presubmit, comments only, should just be "is build fixed"
Bug: 202151792
Change-Id: I2123f804aaed39eb7d31f25058c59a3c1df4d7d1
2021-10-05 09:11:39 -07:00
Alex Johnston
5c35d3bce6 Merge "Revert "Revert "Cherrypicking flags and override methods for all..."" 2021-10-05 14:58:57 +00:00
Alex Johnston
4e8851d0d8 Revert "Revert "Cherrypicking flags and override methods for all..."
Revert "Revert "Required change for adding overload method for r..."

Revert submission 1842720-revert-1836473-receiverChangesinAOSP-FWJQDTADTI

Reason for revert: DroidMonitor-triggered revert due to breakage, bug b/202144225
Reverted Changes:
I03409ea39:Revert "Required change for adding overload method...
I583a11d2a:Revert "Cherrypicking flags and override methods f...

Change-Id: I5cdf9c74d51a259fdaa43dfdc9423d22145eac60
2021-10-05 14:57:10 +00:00
Treehugger Robot
e6bebf94ed Merge "Fix SystemAudioAutoInitiationAction not started" 2021-10-05 12:49:29 +00:00
Bernardo Rufino
9e26212dac Avoid full unparcelling where possible in Bundle
and put a warning where it's not possible. This is to make sure we know
when to touch bundles provided by apps.

In this CL:
* deepCopy() now doesn't deserialize lazy objects before copying. It
  doesn't copy them either, it merely passes them into the new map as
  the same reference. This works because we implemented fine-grained
  locking into each lazy value, so concurrent access won't be a problem.
  Furthermore, LazyValue caches the deserialized object, so we'd still
  honor the contract of deepCopy() that "Other types of objects (such
  as Parcelable or Serializable) are referenced as-is and not copied in
  any way". I had to perform one extra check in the synchronized block
  in LazyValue to guarantee this (double-checked locking), I explain
  that in the comments.
* Removed filterValues() and codepaths that used it. This was created
  with the purpose of removing items whose classes weren't available to
  the system to prevent crashes coming from full deserialization. This
  is not a concern anymore with lazy bundle, hence we can remove the
  codepaths altogether (see email for more details).
* Put warnings in javadoc of getMap() and PeristableBundle().

Test: Boots
Test: atest -d android.os.cts.ParcelTest android.os.cts.BundleTest android.os.BundleTest android.os.ParcelTest
Bug: 195622897
Change-Id: I14bb6a7874814f42cbcc6b5fd372c42752aa74c8
2021-10-05 13:39:36 +01:00
Bernardo Rufino
0c5074ede7 Change defusing for lazy bundles
With lazy bundle, exceptions thrown by deserialization of custom items
moved from being thrown in initializeFromParcelLocked() (when the bundle
is first touched) to being thrown in getValueAt() (whenever the item is
retrieved), which means they were escaping the defuse logic that caught
those exceptions. So, now also catching these exceptions in
getValueAt(), however, here we can be much less drastic, instead of
erasing the bundle, we can simply remove the bad element.

This also means we don't need to log wtf in initializeFromParcelLocked()
if sShouldDefuse = true but the bundle is not marked as defusable, since
touching the bundle doesn't carry the same consequences as before
go/lazy-bundle. So, I moved that log to unparcel(itemwise = true), ie.
whenever the entire bundle is deserialized on purpose.

Now, 2 types of defusing can happen:
1. If the (custom) item we're retrieving caused the exception, we'll
   remove the item and return null.
2. If the exception was raised during partial deserialization, that is,
   during the read of the map and its basic types (while skipping custom
   types), the map will be left empty. I believe only manually written
   parcels would cause this type of exception and if an exception is
   raised here it will also be raised in the final destination too,
   afaict. Because of this, we can now touch app-provided bundles
   without fear of clobbering the data on its way to the final
   destination.

Following conversation on previous CL, narrowed exception raised in case
of unknown type to be BadParcelableException.

Test: atest -d android.os.cts.ParcelTest android.os.cts.BundleTest android.os.BundleTest android.os.ParcelTest
Bug: 195622897
Change-Id: I4746140f63482a9ea475aac25897a447737393e4
2021-10-05 11:40:13 +01:00
Treehugger Robot
5757f89ddc Merge "Round 3: Fix flakiness of testNativeCrash" 2021-10-05 09:16:07 +00:00
Treehugger Robot
0a80b6a3bc Merge "Fix the device summary shown twice issue" 2021-10-05 06:01:30 +00:00
Jacky Kao
98ff8ecdaa Merge "Revert "Cherrypicking flags and override methods for allowing dy..."" 2021-10-05 01:55:36 +00:00
Jacky Kao
0827cf0cca Revert "Cherrypicking flags and override methods for allowing dy..."
Revert "Required change for adding overload method for registerR..."

Revert submission 1836473-receiverChangesinAOSP

Reason for revert: <INSERT REASONING HERE>
Reverted Changes:Making build break
I906ce9eb0:Required change for adding overload method for reg...
I9a16f566c:Cherrypicking flags and override methods for allow...

Change-Id: I583a11d2a23651db24acde303d522a5faae15c6b
2021-10-05 01:48:25 +00:00
Jacob Hobbie
316e0e8336 Merge "Cherrypicking flags and override methods for allowing dynamically registered receivers to mark themselves explicitly as exported or not exported." 2021-10-05 01:10:46 +00:00
Jeff Sharkey
0da8689915 Merge "Delete some ide autogen files" 2021-10-04 23:05:23 +00:00
Steven Moreland
e869287a7b Merge "Parcel: obtain(IBinder) as API" 2021-10-04 20:55:08 +00:00
John Reck
06e16941d5 Merge "CTS of CtsMediaTestCases#android.media.cts.DecodeAccuracyTest may fail when video is cropped. When we use GPU to copy the data, rendering would choose filter. But we need add shrink in border to ensure the sampler not reach border like what GUI does." 2021-10-04 16:31:29 +00:00
Treehugger Robot
b0578d5fa3 Merge "Migrate Cellbroadcast modules to use modules-utils" 2021-10-04 14:06:38 +00:00
Alice Kuo
cd5a8483be Fix the device summary shown twice issue
As getSubDeviceSummy, we should check the memberDevices's size and
decide if the secondarySummary need to be shown.

Bug: 201491295
Bug: 150670922
Test: pair with the A2DP/HFP headset, and check the summary
Change-Id: I8bb0744067733c6e17292d6c7be1c3f110d731e3
2021-10-04 10:23:20 +00:00
Yan Han
580909db49 Round 3: Fix flakiness of testNativeCrash
Round 2: ag/15616233
Round 1: aosp/1702009

Even with increased timeouts, testNativeCrash is not always able to get
the tombstone of the crashed native app. This is because the tombstone
timestamp can be more than 1000ms before the ApplicationExitInfo,
causing them to not match. See b/191798394 for more details.

This CL increases the maximum timestamp difference to ensure that the
tombstone (almost?) always matches.

Bug: 192299487
Test: atest android.app.cts.ActivityManagerAppExitInfoTest
Change-Id: Ideeb93dbcb40ce9d564f159fe1f7574554c09a40
2021-10-04 11:36:00 +02:00
Remi NGUYEN VAN
73a065a41f Merge "Improve "Lost network stack" error message" 2021-10-04 07:55:30 +00:00
Remi NGUYEN VAN
aea8b250d6 Improve "Lost network stack" error message
The "Lost network stack" message often gets reported as suspected
root cause of a crash, but it is actually just a side-effect of a crash
of the network_stack process, which often was just killed together with
the rest of the system.

Clarify the error message, so that it is clear that the root cause
should be visible earlier in logs.

Bug: 198681439
Change-Id: Ieb79ace34170f8bd9ea847175199590998278d57
Test: m
2021-10-04 07:54:47 +00:00
Steven Moreland
c861533254 Parcel: obtain(IBinder) as API
There are two main usecases for this:
- provide an alternative route to implement features like markSensitive
  (which requires only 1 function call per class, rather than a
    function call and flag per transaction type)
- support RPC format transactions

Bug: 175814583
Test: atest android.os.ParcelTest, boot, manual
Change-Id: Ibaacc27a125a31e18d4b5889d05d12cc18d05624
2021-10-01 14:51:18 -07:00
John Reck
b48d4d10ab CTS of CtsMediaTestCases#android.media.cts.DecodeAccuracyTest may fail when video is cropped.
When we use GPU to copy the data, rendering would choose filter. But we need add shrink in border to ensure the sampler not reach border like what GUI does.

Change-Id: I2c59956f3d7a7052d8e4bee587360f252a6c5549
Signed-off-by: Chun Jiang <chun.jiang@mediatek.com>
Bug: 197180327
Test: CTS PixelCopyTests & DecodeAccuracyTest
2021-10-01 16:30:11 -04:00
Mohammad Islam
cbe9af5ab5 Merge "libbinder: split out PackageManagerNative aidl" 2021-10-01 12:52:23 +00:00
Bernardo Rufino
861d2e12cb Merge "Correct Parcel value types" 2021-10-01 09:46:40 +00:00
Bernardo Rufino
5539926c4a Correct Parcel value types
* Bundle supports types char, char[], short[], float[] which were
  falling back to serializable handling in Parcel because readValue()
  didn't have specific support for those types. Adding support in Parcel
  to avoid the need for length-prefixing and to improve performance.
  Curiously some of those had read/write methods already.
* Updated Bundle to just pull the types above from the map since those
  won't be lazy values anymore.
* We were missing a few custom type containers in our list of
  length-prefixed types and we were listing Bundle unnecessarily as
  length-prefixed since Bundle itself is already length-prefixed and
  copies the correspondent section of the parcel internally.

Test: atest -d android.os.cts.ParcelTest android.os.cts.BundleTest android.os.BundleTest android.os.ParcelTest
Bug: 195622897
Change-Id: I1e15d59d883311685ffa32ece1f5a00e01bf6aea
2021-10-01 09:07:49 +01:00
Wonsik Kim
8af4d26826 media: use MediaProperties.resolution_limit_32bit()
For 32-bit resolution limit, read from
MediaProperties.resolution_limit_32bit().

Bug: 194771349
Test: cts/media/device-small
Change-Id: I30269383eed2929ff88da21913cebb4111d72e10
2021-09-30 23:11:12 -07:00
Hao Ke
d3199a6084 Merge "Adding typed Parcel read/write APIs." 2021-09-30 21:13:54 +00:00
Steven Moreland
fb7a6db2a2 Merge "Parcel: markForBinder -> obtain(IBinder)" 2021-09-30 17:59:47 +00:00
Sam Gilbert
55fb62a515 Merge "Fix writeToParcel parameter nullability" 2021-09-30 17:08:19 +00:00
Hao Ke
8a86e7d51e Adding typed Parcel read/write APIs.
Description:

Added replacements of `readList`, `readParcelable` and
`readParcelableCreator` APIs.

To avoid unexpected types of objects being unparcelled,
ideally clients would use the readTypedXXX() methods that
take the parcelable creator. However, this won’t be an option
for use cases involving deserializing children objects
inherited from non-final parcelable or serializable objects.
Currently out of ~4k parcelable classes, only ~1.5k
are marked as “final” in the platform. Hence it would be
necessary to introduce new replacements that take
an extra Class<T> parameter and before deserializing
we check that the class written on the wire is the
same or a descendant from the one provided as argument.

Doing so could enhance the security of Parcel deserialization,
More details can be found at go/safer-parcel.

Test: atest -d android.os.cts.ParcelTest
Bug: 195622897
Change-Id: Ie9a4cb4c3d6f1805b14df7b703aef43e2993d459
2021-09-30 16:31:16 +00:00
Bernardo Rufino
1cdbc7cbd1 Merge "Log.wtf in mismatch + tests" 2021-09-30 10:17:45 +00:00
Suprabh Shukla
17a7d79ff4 Merge "Redact key value from log when DEBUG is false" 2021-09-29 23:25:21 +00:00
Steven Moreland
8c15362858 Parcel: markForBinder -> obtain(IBinder)
So that the API more closely matches intended usage, as requested.

Bug: 175814583
Test: aidl_integration_test
Change-Id: I2fb5f2d5059d7f9cd9e034a4d0d2e7aa63692067
2021-09-29 16:17:45 -07:00
Brad Ebinger
6a5e594515 Merge "Add a device overlay for radio off delay due to IMS deregistration" 2021-09-29 18:15:58 +00:00
Sam Gilbert
e3e9e3f6d4 Fix writeToParcel parameter nullability
Test: Existing tests
Bug: 144855352
Change-Id: Id3e0de043eee77e1dadf3b4db5d6d4bddd9e8247
2021-09-29 13:54:34 -04:00
Bernardo Rufino
95ace87925 Log.wtf in mismatch + tests
Log mismatches as wtf to be able track those. Also added unit tests
around kindofEquals() and r/w mismatches.

Test: atest -d android.os.cts.ParcelTest android.os.cts.BundleTest android.os.BundleTest android.os.ParcelTest
Bug: 195622897
Change-Id: I361dd144b23975eedc8b19ed65457a1c5405936e
2021-09-29 13:51:43 +01:00
Edward Savage-Jones
46b4ba4201 Redact key value from log when DEBUG is false
See bug for details

Bug: 170653379
Test: see bug
Change-Id: I713fd8c03444167faf35a170b885c38af5482e31
2021-09-29 06:53:42 +00:00
daren.liao
c5093cfb71 Fix SystemAudioAutoInitiationAction not started
[Description]
revert part of solution in
55bc36d33c

On Android R, TV's power status is TRANSIENT_TO_STANDBY
by default, in this case, device information related actions
should be started as well, that's why we allow
SystemAudioAutoInitiationAction and NewDeviceAction to be started

When TV boot up, SystemAudioAutoInitiationAction
is not started if power statusof HdmiControlService is not ON

This happens if onNewAvrAdded is called before
SystemService.PHASE_BOOT_COMPLETED

Bug: 194429425

Test:
Build PASS
Boot with ARC device plugged PASS

Change-Id: I79cd1d4f5a180a052be49df186505e579f7d1339
2021-09-29 05:46:33 +00:00
Luke Huang
2adba7dd4a Merge "Keep the native mdns daemon alive for pre-S application" 2021-09-29 03:35:20 +00:00
Treehugger Robot
d801feda70 Merge "Fix stuck HDMI-CEC actions after boot" 2021-09-28 17:16:41 +00:00
Mohammad Islam
0fe46d947a Merge "Fix broken test on GSI branch" 2021-09-28 15:37:08 +00:00
Yan Han
85b7711700 Fix stuck HDMI-CEC actions after boot
Ensures that all queued actions on local devices are started after
boot. Previously, an unstarted SendKeyAction could stick around after
boot, blocking any future SendKeyAction from being created.

Unit tests omitted because of AOSP incompatibilities.

Bug: 193188675
Test: atest HdmiControlServiceTest#normalBoot_queuedActionsStartedAfterBoot

      manual test: spam volume up on boot with IR volume control enabled

Change-Id: I0050ca927bdba939b0b0030a6aa2f6235b11ff5c
Merged-In: I0050ca927bdba939b0b0030a6aa2f6235b11ff5c
(cherry picked from commit 22dc89a89f)
2021-09-28 14:00:48 +00:00
Anton Hansson
0e4260d772 Merge "Add a tool for merging annotation.zip files" 2021-09-28 10:27:22 +00:00