Commit Graph

10845 Commits

Author SHA1 Message Date
Treehugger Robot
75e0091067 Merge "Consolidating PM owner definition and adding new owners." 2021-10-26 18:39:51 +00:00
Treehugger Robot
168b5655a4 Merge "Revert "Removed BluetoothDevice#prepareToEnterProcess"" 2021-10-26 15:32:33 +00:00
Etienne Ruffieux
255c70fbbc Revert "Removed BluetoothDevice#prepareToEnterProcess"
This reverts commit e8f2077fee.

Reason for revert: Introducing regression for gms core

Test: None
Change-Id: I644b10c1869c12e1622300de43bfbdb57fb583d8
2021-10-25 21:42:17 +00:00
Patrick Baumann
8255f5f4c0 Consolidating PM owner definition and adding new owners.
Change-Id: If4b080755701452c53d55f26380e887dc3944dbf
2021-10-19 21:06:56 +00:00
Treehugger Robot
e722500621 Merge "Removed BluetoothDevice#prepareToEnterProcess" 2021-10-18 21:37:57 +00:00
Etienne Ruffieux
e8f2077fee Removed BluetoothDevice#prepareToEnterProcess
Tag: #feature
Bug: 200202780
Test: manual
Change-Id: I8d4be1da1bcb5b819c324f1a3a89c7dc317c31d6
2021-10-15 14:41:32 +00:00
Felka Chang
6829841745 Fix Configuration.diff documentation.
By using ActivityInfo.Config to annotate the return type of
Configuration.diff, it not only solves the wrong document but also
makes the documentation of Configuration.diff consist with
the documentation of Configuration.updateFrom.

The final result is the following.
```
Returns a bit mask indicating which configuration values have changed.
Value is either 0 or a combination of ActivityInfo.CONFIG_MCC,
ActivityInfo.CONFIG_MNC, ActivityInfo.CONFIG_LOCALE,
ActivityInfo.CONFIG_TOUCHSCREEN, ActivityInfo.CONFIG_KEYBOARD,
ActivityInfo.CONFIG_KEYBOARD_HIDDEN, ActivityInfo.CONFIG_NAVIGATION,
ActivityInfo.CONFIG_ORIENTATION, ActivityInfo.CONFIG_SCREEN_LAYOUT,
ActivityInfo.CONFIG_UI_MODE, ActivityInfo.CONFIG_SCREEN_SIZE,
ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE, ActivityInfo.CONFIG_DENSITY,
ActivityInfo.CONFIG_LAYOUT_DIRECTION, ActivityInfo.CONFIG_COLOR_MODE,
and ActivityInfo.CONFIG_FONT_SCALE
```

Test: make docs
Test: review reference/android/content/res/Configuration.html in
      out/target/common/docs/online-sdk-docs-docs.zip

Fixes: 171738297
Bug: 171716892
Change-Id: Iaa2ac25bc1269e4a9a625cce386f51984ffff923
2021-10-13 20:50:03 +08:00
Treehugger Robot
3aaf984908 Merge "Avoid full unparcelling where possible in Bundle" am: 3ad4ecc296
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1842226

Change-Id: I0aef93d99d83f20b22753e8e1d41cfb5c4b5cdce
2021-10-06 12:25:47 +00:00
Treehugger Robot
3ad4ecc296 Merge "Avoid full unparcelling where possible in Bundle" 2021-10-06 12:06:59 +00:00
Treehugger Robot
3b449c249f Merge "Fixing a build breakage caused by an incorrect link. Version code for Android T doesn't exist yet, removing the link." am: 6a0afe1846
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1845234

Change-Id: I8249e3a7426ee9f3d2d22ba6ae093d217980acc2
2021-10-05 18:36:56 +00:00
TreeHugger Robot
d34ebacb36 Merge "Use AttributionSource Builder" into stage-aosp-master 2021-10-05 17:17:13 +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
c8c3e89dce Merge "Revert "Revert "Cherrypicking flags and override methods for all..."" am: 5c35d3bce6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1845059

Change-Id: I90e8a4d567fe2de9ab765806fc7bd3aba4fe0845
2021-10-05 15:11:32 +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
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
Jacky Kao
1a894180c9 Merge "Revert "Cherrypicking flags and override methods for allowing dy..."" am: 98ff8ecdaa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1842721

Change-Id: Ieaed4fcc2fa97db551a70f4a3076b4237acfb8ab
2021-10-05 02:08:29 +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
7e5da1ee2e Merge "Cherrypicking flags and override methods for allowing dynamically registered receivers to mark themselves explicitly as exported or not exported." am: 316e0e8336
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1836473

Change-Id: I39049e42feb66c3fa3f0ebdef8e175ae86d5d410
2021-10-05 01:24:33 +00:00
Xin Li
8891d70334 Merge SP1A.210812.016
Merged-In: I8b62b9b9d7ae271bc623764d545db1320b4dc64f
Change-Id: I458ed7f2eb8603f5e89c1d73bc0f0d52b826973e
2021-09-28 19:26:36 +00:00
Jacob Hobbie
f76e50ba48 Cherrypicking flags and override methods for allowing dynamically
registered receivers to mark themselves explicitly as exported or not
exported.

Test: will add tests with enforcement
Change-Id: I9a16f566c54e389743dcf460734ecdc0b1081768
2021-09-23 08:20:04 -07:00
William Escande
c05e55ffbf Use AttributionSource Builder
Attribution source constructor are hidden api
Add a Builder option to take a AttributionSource as parameter

Test: atest BluetoothInstrumentationTests
Bug: 195144968
Tag: #refactor
Ignore-AOSP-First: No such thing on aosp
Change-Id: I901c8afff6a40bd8484fd8e10baf290aa483c280
2021-09-22 20:22:36 +02:00
Bill Yi
505f138725 Merge RQ3A.210905.001 to aosp-master - DO NOT MERGE
Merged-In: If0c6aebc7ecb401d0f68a00a746f7ae337e4bb86
Merged-In: Ic4c9fc8a62966b7b171d4ff2185e3d3232dea2e0
Merged-In: Ic4c9fc8a62966b7b171d4ff2185e3d3232dea2e0
Change-Id: Ife6d981ebcc9d55b8b7f0089ef9af09a51ae87c5
2021-09-08 18:01:22 -07:00
Treehugger Robot
c1a5b99f86 Merge "OverlayManager: use typed collection type in AIDL" am: 497e28ecf3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1801774

Change-Id: I2c504229c8251d5429d9105a1a6f6dfedb788cb7
2021-08-24 02:03:04 +00:00
Jooyung Han
8ed699e610 OverlayManager: use typed collection type in AIDL
Use Map<K,V> and List<V>.

Bug: 192615532
Test: m
Change-Id: I5ad7f67b4b08b646362a58214c3b62cd1ada28c0
2021-08-19 15:56:48 +09:00
Treehugger Robot
82a84c8c8d Merge "Update OWNERS for Intent* and Content*" am: 6e3ea69863
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1799046

Change-Id: Icea95dd713a074ecad5e7fcf4ab001e6e780db47
2021-08-17 23:27:51 +00:00
Makoto Onuki
ea8407635c Update OWNERS for Intent* and Content*
Test: Build
Change-Id: I2232342d3e68cc8e1eea14bfa999f32b15ba5789
2021-08-17 14:27:35 -07:00
Ray Essick
4cfe431f14 Rename android.media.MediaTranscodeManager -> MediaTranscodingManager
renamed to avoid conflict with existing copy in the R framework.jar.
The framework.jar copy was removed during S development

Bug: 195608856
Test: build
Test: cts-tradefed run cts -m CtsMediaTranscodingTestCases
Change-Id: I40ab066cd61be8d278f21cc788016f2edd6bb86e
(cherry picked from commit 1168d9d014)
2021-08-17 01:09:58 +00:00
Rhed Jao
97ff8e3eed Merge "DO NOT MERGE Apply a maximum char count to the load label api" into sc-dev 2021-08-09 10:48:39 +00:00
Nate Myren
aadf463f5a Merge "Remove calling UID check from ContentProvider" into sc-dev am: c2c1c0341b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15463733

Change-Id: Icc27b330ac2f4c2208fcdc08322d05cca67cbc8d
2021-08-05 16:58:10 +00:00
Nate Myren
e758539f02 Remove calling UID check from ContentProvider
AttributionSource checks calling UID on unparcel (so the check is not
necessary), and some ContentProviders may clear calling identity.

Test: Manual
Fixes: 188755312
Change-Id: If629eea3ba8c1a57fd4b7aff0fec2c0acb5f69be
2021-08-04 20:25:21 +00:00
Rhed Jao
cd8558a253 DO NOT MERGE Apply a maximum char count to the load label api
The system is overwhelmed by an enormous label string returned by
the load label api. This cl truncates the label string if it exceeds
the maximum safe length.

Bug: 67013844
Test: atest PackageManagerTest
Change-Id: Ia4d768cc93a47cfb8b6f7c4b6dc73abd801809bd
Merged-in: Ia4d768cc93a47cfb8b6f7c4b6dc73abd801809bd
2021-08-03 04:15:21 +00:00
Alex Buynytskyy
9336680fe5 Merge "Check for invalid (negative) string pool pos." into sc-dev am: 59bad728e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15390628

Change-Id: Idcdd73f51cab13a188cf6391954662a3c74243b9
2021-07-27 14:51:48 +00:00
Alex Buynytskyy
b2a831ac3c Check for invalid (negative) string pool pos.
Parcel implementation would crash the system server otherwise.
Any exception is OK as it'll cause the cache to be invalidated.
Crash is not OK.

Bug: 194632313
Fixes: 194632313
Test: atest PackageParserCacheHelperTest
Change-Id: I58a4496b4646e172e6c3aee9ea17854a7ef55eaa
2021-07-26 18:51:02 +00:00
Jeff Sharkey
5d6be79488 Merge "Root UID can synthesize AttributionSource values." into sc-dev am: 9d0ddef67b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15285879

Change-Id: Id4254922cb486ba49eebe55caa74249583c4d5bd
2021-07-14 23:37:58 +00:00
Jeff Sharkey
38ffbde17e Root UID can synthesize AttributionSource values.
We trust any incoming value from the system UID, so we should also
trust values coming from the root UID, which includes many shell
commands such as "svc".

Bug: 193659633
Test: atest BluetoothInstrumentationTests:com.android.bluetooth.btservice.AdapterServiceTest --rerun-until-failure 100
Change-Id: Ied07731345f08fc3c4df465a3773e35c8df7c59a
2021-07-14 14:35:17 -06:00
TreeHugger Robot
2fa0bc50f2 Merge "Validate AttributionSource during unparceling." into sc-dev am: fee338118c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15275356

Change-Id: Ia6de0ea0abf38ece5ca1e6fb8f9ebad91fd07bd9
2021-07-13 21:01:47 +00:00
TreeHugger Robot
fee338118c Merge "Validate AttributionSource during unparceling." into sc-dev 2021-07-13 20:57:17 +00:00
Jeff Sharkey
4025c6e7ae Validate AttributionSource during unparceling.
The Bluetooth stack is just one example of an application that makes
self-calls through public APIs, which makes it very difficult to
unconditionally validate AttributionSource arguments.

(The AttributionSource is correctly defined the first time a remote
caller enters the Bluetooth stack, but we've found many cases where
Bluetooth stack calls back into itself without clearing the Binder
identity, causing validation chaos.)

This change is an attempt at gracefully solving this by performing
validation automatically as part of unparceling an AttributionSource
the first time it enters a process.  This strategy isn't perfect,
since transporting an instance inside a Bundle would risk
unparceling much later, possibly long after the calling UID
information has been discarded.  We're rationalizing that this risk
doesn't exist since AttributionSource was only added a few months
ago, and isn't being used in this way.

We still intend to circle back and provide a better strategy in a
future release for transporting AttributionSource across AIDL which
will handle the nuances of self-calls.

Bug: 188391719
Test: atest BluetoothInstrumentationTests
Change-Id: I10b198cfcd8f361e19d52f86deb7f10f05fec891
2021-07-13 12:34:14 -06:00
TreeHugger Robot
01f6847c8a Merge "Optimize AttributionSource tokens - base" into sc-dev am: 2b90cc827b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15247205

Change-Id: Id2435469fff42a22018a0d08370a987a76eb42b4
2021-07-12 20:30:07 +00:00
Svet Ganov
1babd5bf51 Optimize AttributionSource tokens - base
For cases where the attribution soruce doesn't need to be
registered as trusted we are now using a shares static
token since the only purpose of the token in these cases
is for watching the source process dying as opposed to that
and security for registered cases.

bug: 192415943

Test: CtsPermissionTestCases
      CtsPermission2TestCases
      CtsPermission3TestCases
      CtsPermission4TestCases
      CtsPermission5TestCases

Change-Id: I93fde9ca1cacada7929761533dcae11b2736ce1e
2021-07-10 00:24:30 +00:00
Tom Natan
887c796529 Merge "Add support for always_constrain_display_apis flag" into sc-dev am: 28a6e9f973
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15216092

Change-Id: I9df325234e3e01b59c0a17fc8109f1c90182613d
2021-07-08 10:30:09 +00:00
Tom Natan
28a6e9f973 Merge "Add support for always_constrain_display_apis flag" into sc-dev 2021-07-08 10:25:09 +00:00
TreeHugger Robot
eed6b1b8d1 Merge "Tag some "new Binder()" instances to detect leaks." into sc-dev am: c8955e0799
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15225384

Change-Id: I97ad328303c4c297294400a74d887c9067d4f2ba
2021-07-08 00:45:01 +00:00
Jeff Sharkey
79b834d47c Tag some "new Binder()" instances to detect leaks.
We've seen evidence of a Binder leak, and our hunch is that it's
caused by one of these anonymous "new Binder()" sites.  Adding
descriptors will help us identify the leak cause.

Bug: 192415943
Test: atest BluetoothInstrumentationTests
Change-Id: I30cd15f084cf50f67edd833b27b853c4b22e1db1
2021-07-07 17:17:07 -06:00
tomnatan
f332106222 Add support for always_constrain_display_apis flag
Bug: 191184114
Test: atest WmTests:SizeCompatTests
Test: atest FrameworksCoreTests:ConstrainDisplayApisConfigTest
Change-Id: Ifc0d48c838216603c00f4cc09d0df2fd145a53a6
2021-07-06 15:18:50 +00:00
Winson Chung
6e004f8baf Merge "Only provide the resolved activity info to the global intercept window" into sc-dev am: b827a8ac83
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15117326

Change-Id: Ia3438311fa95e863bddfa02c743b4ae76bcec594
2021-07-01 17:50:04 +00:00
Winson Chung
b827a8ac83 Merge "Only provide the resolved activity info to the global intercept window" into sc-dev 2021-07-01 17:33:27 +00:00
Winson Chung
d07dca11ab Only provide the resolved activity info to the global intercept window
- Previously we were adding the activity info to the ClipData, but
  that data is provided to non-intercept windows when the drop happens
  and can be retrieved using reflection. The intention was only to
  provide this activity info to the shell global intercept window
  for invoking split.

  Instead of baking the info into the ClipData, we pass the resolved
  info along side the data and only construct a ClipData with the
  additional info for the intercept window.

Fixes: 191057499
Test: atest DragDropControllerTests
Change-Id: I2ccc9f1f666ff2a388f22b6e6a7b5eea3102964c
2021-07-01 17:32:18 +00:00
Winson
49cb41f9d7 Remove ParsedIntentInfo CREATOR
Its existence allows implicit readParcelable calls to invoke a Parcel
operation with mismatched read/write data sizes, allowing someone to
swap out the data on a reparcel.

Internal classes will use writeIntentInfoToParcel, so this is safe to
remove.

Bug: 191055353

Test: atest com.android.server.pm.test.parsing.parcelling

Change-Id: I44faa635faf8a77894a3dda8adf89c10064e53f1
(cherry picked from commit 75214cc510)
2021-06-30 23:58:42 +00:00
Ryan Mitchell
2df59f17a5 Merge changes from topic "revert-15058002-SNQUARIDWJ" into sc-dev am: b3659d36b0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15156470

Change-Id: Id89a53b584251a3476b6c7c8b88d6f70e9dc7940
2021-06-30 21:11:17 +00:00