Commit Graph

11142 Commits

Author SHA1 Message Date
Jeff Sharkey
57a8f9431e Merge "Root UID can synthesize AttributionSource values." into sc-dev am: 9d0ddef67b am: e4f4fa91e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15285879

Change-Id: I967ed6c8b891e0ba03e10f001ef108ced62572b8
2021-07-14 23:49:43 +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
20b74d19a9 Merge "Validate AttributionSource during unparceling." into sc-dev am: fee338118c am: 0a31518cc0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15275356

Change-Id: Ie29230201b4455228f10c3ea8128294faad6596b
2021-07-13 21:16:51 +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
Jeff Sharkey
30eb87d8e0 Merge "Bring Predicate<Intent> to IntentFilter." 2021-07-12 15:16:13 +00:00
TreeHugger Robot
26bcb4a503 Merge "Optimize AttributionSource tokens - base" into sc-dev am: 2b90cc827b am: 5e1a6bc443
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15247205

Change-Id: Ida44135b60e19d97c24f79ba2ff4d019d830b908
2021-07-10 02:36:28 +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
2a3edbf6aa Merge "Add support for always_constrain_display_apis flag" into sc-dev am: 28a6e9f973 am: 5ff31f2304 am: 7db1f9f309
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15216092

Change-Id: I2c17714aff53c40efc955c7aadbf8c1ff6dbe2ea
2021-07-08 10:41:17 +00:00
Tom Natan
7db1f9f309 Merge "Add support for always_constrain_display_apis flag" into sc-dev am: 28a6e9f973 am: 5ff31f2304
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15216092

Change-Id: I9a8a095b4b9b3874bd5e6c0041cc0189e4dfeb87
2021-07-08 10:36:37 +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
c4c0b6251b Merge "Tag some "new Binder()" instances to detect leaks." into sc-dev am: c8955e0799 am: 7da4e4c89c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15225384

Change-Id: I74e95d4f14d80e92405a5fc872978540838f5888
2021-07-08 00:58:51 +00:00
TreeHugger Robot
05d6c2b79a Merge "Tag some "new Binder()" instances to detect leaks." into sc-dev am: c8955e0799 am: 7b41a7b17a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15225384

Change-Id: I23a82fd99bc697285ae2ab9436e9f711f57c7c23
2021-07-08 00:50:18 +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
Varun Shah
31a19cb058 Fix typo in ContentResolver#addPeriodicSync doc.
Change-Id: I356fa893e62b5ad2d61a51b18ea12f5181125375
Fixes: 192685753
Test: n/a
2021-07-02 23:41:26 +00:00
Jeff Sharkey
ca09f5b941 Bring Predicate<Intent> to IntentFilter.
It's what IntentFilter is actually designed to do internally, so give
developers a useful functional interface.  Continue offering nuance
of using MIME types as-is or offering to resolve them first through
two different asPredicate() methods.

Bug: 161252188
Test: atest IntentFilterTest
Change-Id: Iefd9e03369d72676809ddc8d924703ad7921fde5
2021-07-01 20:47:41 +00:00
Winson Chung
a54fbe7756 Merge "Only provide the resolved activity info to the global intercept window" into sc-dev am: b827a8ac83 am: 09dce4bc2a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15117326

Change-Id: Ibe63b8e551577d14513a72bc14c8867501d5b35f
2021-07-01 17:50:51 +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
Ryan Mitchell
33f7a4771c Merge changes from topic "revert-15058002-SNQUARIDWJ" into sc-dev am: b3659d36b0 am: 30d3f5c8cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15156470

Change-Id: Iaccb9ef10405114fa3cc3456404759a8d49678ed
2021-07-01 13:53:36 +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
Ryan Mitchell
b3659d36b0 Merge changes from topic "revert-15058002-SNQUARIDWJ" into sc-dev
* changes:
  Revert^2 "Apply overlay changes with config change"
  Revert^3 "Deprecate Context#createApplicationContext"
2021-06-30 20:58:43 +00:00
Ryan Mitchell
350c2669d6 Revert^3 "Deprecate Context#createApplicationContext"
This reverts commit cb5a80ea57.

Reason for revert: Was not the cause of the test failure

Fixes: 186622527
Test: atest FrameworksCoreTests:ContextTest
Change-Id: I705854f080200f0465d94a7754e710f05a3ec92c
2021-06-30 15:53:45 +00:00
Jackal Guo
4a8b366644 Merge "Move BootTest to internal test" into sc-dev am: 04a45607c1 am: ac928e756b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15126448

Change-Id: I2ec2f2b993013f5c5b7ae56a9492d03b452e977e
2021-06-30 05:58:14 +00:00
Jackal Guo
6564e092b7 Merge "Move BootTest to internal test" into sc-dev am: 04a45607c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15126448

Change-Id: Ib6be712e6a0a3199e62472a963aa08d6b455b140
2021-06-30 05:42:03 +00:00
Jackal Guo
04a45607c1 Merge "Move BootTest to internal test" into sc-dev 2021-06-30 05:39:37 +00:00
TreeHugger Robot
c44dd37f55 Merge "Improve javadocs for repeating alarms" into sc-dev am: 4260ce4100 am: c84279938a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15147288

Change-Id: I5382b19743992db5e27b5ce38638948830313968
2021-06-30 01:08:06 +00:00
TreeHugger Robot
7f7a4d5069 Merge "Improve javadocs for repeating alarms" into sc-dev am: 4260ce4100
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15147288

Change-Id: Iacf91c398261baa120766d440bf385f8f7e02106
2021-06-30 01:05:33 +00:00
TreeHugger Robot
4260ce4100 Merge "Improve javadocs for repeating alarms" into sc-dev 2021-06-30 00:55:07 +00:00
Suprabh Shukla
94f5840bed Improve javadocs for repeating alarms
Specifically, mentioning that the alarm count can only be included with
the alarm if the supplied pending intent is mutable.

Test: make offline-sdk-docs

Fixes: 178413211
Change-Id: I2914bceebeed8b52b0de11d70960aa33e6837b13
2021-06-29 17:34:14 -07:00
TreeHugger Robot
25a9021b8d Merge "Double DEFAULT_MAX_LABEL_SIZE_PX to 1000px" into sc-dev am: a46f524537 am: b870acbd5a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15143634

Change-Id: I2a500a03f2fb562ee7e7ac033e10223808ca9f6e
2021-06-30 00:06:21 +00:00
TreeHugger Robot
156829bd80 Merge "Double DEFAULT_MAX_LABEL_SIZE_PX to 1000px" into sc-dev am: a46f524537
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15143634

Change-Id: I73e80ffb8b5afde1d364fabae175555bdbaa9f5d
2021-06-29 23:51:31 +00:00
TreeHugger Robot
a46f524537 Merge "Double DEFAULT_MAX_LABEL_SIZE_PX to 1000px" into sc-dev 2021-06-29 23:36:33 +00:00
Paul Hobbs
bea71c4df6 Merge changes from topic "revert-15058002-SNQUARIDWJ" into sc-dev am: 8d440c0566 am: 30c6c3da16
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15144638

Change-Id: I480ec5d23f070c8383ea121432a9dd6c563a9188
2021-06-29 21:06:36 +00:00
Paul Hobbs
3053bd7ab0 Merge changes from topic "revert-15058002-SNQUARIDWJ" into sc-dev am: 8d440c0566
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15144638

Change-Id: I0612c824b412153bb571e5ff1f47d707269a05a6
2021-06-29 20:54:31 +00:00
Paul Hobbs
8d440c0566 Merge changes from topic "revert-15058002-SNQUARIDWJ" into sc-dev
* changes:
  Revert^2 "Deprecate Context#createApplicationContext"
  Revert "Version LoadedApk cache using base code path"
  Revert "Apply overlay changes with config change"
2021-06-29 20:36:15 +00:00
Paul Hobbs
cb5a80ea57 Revert^2 "Deprecate Context#createApplicationContext"
Bug: 192242649

5a41b45a85

Change-Id: Idcebd68e0079e7e87de04ae25069b3a9ff72093c
2021-06-29 20:06:45 +00:00
Erik Wolsheimer
48af5ac794 Double DEFAULT_MAX_LABEL_SIZE_PX to 1000px
Fixes: 185869616
Test: Manual
Change-Id: I717d1e7fb7b912a0330ac08742206314c23b32c8
2021-06-29 17:51:07 +00:00
TreeHugger Robot
feea9c0ae4 Merge "Fix links in setRequireUserAction docs" into sc-dev am: f43a7b8d5c am: a49ce9caa3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14921913

Change-Id: I66292fda9a18b620b7686aaeb17c00423e7ead46
2021-06-29 16:19:20 +00:00
TreeHugger Robot
ce2cc00c83 Merge "Fix links in setRequireUserAction docs" into sc-dev am: f43a7b8d5c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14921913

Change-Id: I3736f538dc9d1e78abdea2ee6fb121a48c85e18b
2021-06-29 16:01:32 +00:00
Jackal Guo
c9b3bd434e Move BootTest to internal test
Add a test to ensure that system could boot without exception after
a package is uninstalled with keeping data.

Bug: 188635265
Test: atest PackageManagerServiceHostTests
Change-Id: I190db789ecd8c0ca1ddd87fc1c6ef79593b35492
2021-06-29 12:04:41 +08:00
Patrick Baumann
c6bce70bc2 Fix links in setRequireUserAction docs
This change cleans up a couple of links in the new setRequireUserAction
javadocs to avoid listing the entire permission namespace in the text.

Fixes: 190535637
Test: Builds
Change-Id: I80fff983309963e0a2485510e793f30fcfbec28e
2021-06-29 02:29:53 +00:00
Ryan Mitchell
702a3e0710 Merge changes Icf81845d,Iea54abf3,I98656314 into sc-dev am: 5a532f6eed am: f55b43b332
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15058002

Change-Id: Ifd34e72963e196376f408eac4f195142575a4402
2021-06-27 06:52:58 +00:00
Ryan Mitchell
2f0946ab86 Merge changes Icf81845d,Iea54abf3,I98656314 into sc-dev am: 5a532f6eed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15058002

Change-Id: Ia5df591c3d0fe5e8fe2bd82c62f527bd9f623391
2021-06-27 06:37:59 +00:00
Ryan Mitchell
5a532f6eed Merge changes Icf81845d,Iea54abf3,I98656314 into sc-dev
* changes:
  Apply overlay changes with config change
  Version LoadedApk cache using base code path
  Revert "Deprecate Context#createApplicationContext"
2021-06-27 06:27:58 +00:00
Winson
5f4590c011 Remove ParsedIntentInfo CREATOR am: 75214cc510 am: f416e7b485 am: 2d96f8ab31 am: 215f4c16a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080916

Change-Id: Idabef2306769146deaa1369234f7f4b323f6d8f4
2021-06-24 22:20:42 +00:00
Winson
a42c38d04a Remove ParsedIntentInfo CREATOR am: 75214cc510 am: f416e7b485 am: 2d96f8ab31
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080916

Change-Id: Iaeb8f0c3b57acb758821a218a8cceb57301834ce
2021-06-24 22:11:28 +00:00
Winson
2d96f8ab31 Remove ParsedIntentInfo CREATOR am: 75214cc510 am: f416e7b485
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080916

Change-Id: I8376c9667aa64953551961c3346447ad06c93f10
2021-06-24 22:01:29 +00:00