Commit Graph

12158 Commits

Author SHA1 Message Date
Louis Chang
02705976b9 Merge "Reverting the Intent package-equivalent component checks" 2022-08-08 08:42:54 +00:00
Jay Sullivan
cf0115463c Merge "Add REQUESTED_PERMISSION_IMPLICIT flag" 2022-08-06 01:27:44 +00:00
Louis Chang
40cc579cd3 Reverting the Intent package-equivalent component checks
The commit 9c5a330 skips package checks if the package-equivalent
components are set. However, it could also result in inconsistent
behavior on #filterHashCode.

Fixing the original issue from the intent itself instead.

Bug: 64108432
Bug: 64789334
Test: atest TaskTests
Change-Id: I18c717e29072df91fb19eddbddc78153a28f9563
2022-08-05 10:17:24 +00:00
Louis Chang
f9c6e7b7fb Merge "Avoid configuration not updated after reasonable configuration changes" 2022-08-04 09:45:56 +00:00
Lee Shombert
48900f8201 Merge "Increase the size of selected binder caches" 2022-08-02 17:08:47 +00:00
Lee Shombert
28f3934a25 Increase the size of selected binder caches
Bug: 237309566

The maximum size of selected binder caches is increased to avoid
overflow.  The overflow was found in a partner bug report.

The maximum size does not affect memory consumption until the cache
hits the limit, so caches that were not overflowing before will not
see increased memory consumption.  Also, the caches that are affected
by this change are either static (one per process) or exist in just a
few intances per process, so the total memory impact is small.

Note that most of the overflows occurred in vendor processes.

Test: atest
 * android.app.ApplicationPackageManagerTest
 * com.android.server.pm.PackageManagerTests
 * com.android.server.pm.PackageManagerServiceTest
 * com.android.server.compat.PlatformCompatTest
 * com.android.server.compat.CompatConfigTest
 * android.app.compat.CompatChangesTest
 * PlatformCompatGating

Change-Id: I7f60ad9008bf894d6cb967ce1a54ab33af650efc
2022-07-29 17:09:49 -07:00
TreeHugger Robot
bd8b0fcd00 Merge "Update ContentProvider to use the AM trace tag." 2022-07-29 19:35:13 +00:00
Varun Shah
f3f9b7ca95 Update ContentProvider to use the AM trace tag.
Fixes: 240405950
Test: m & verify trace tag
Change-Id: If0cb0b6a4a590836149b53284f584779303a7000
2022-07-29 10:51:29 -07:00
Tiger Huang
ae9d2aa672 Merge "Send size-compat scale to the client" into tm-qpr-dev am: 93a238d15d am: 3995c4d303
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19149526

Change-Id: Ic48b954694b8d6cafce8b421dcbcd94f63793acc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 09:47:33 +00:00
Tiger Huang
3995c4d303 Merge "Send size-compat scale to the client" into tm-qpr-dev am: 93a238d15d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19149526

Change-Id: If3a51277578c31ba2c0e8c75341b33cd1f5cd9ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 09:23:15 +00:00
Tiger Huang
c77eaf873d Send size-compat scale to the client
The client computes the window frame on its own in ViewRootImpl#setView.
However, the bounds obtained from WindowConfiguration is not size-
compatible, which makes legacy apps produce wrong frames. The frame is
larger than expected, so when computing WindowInsets with size-
compatible InsetsState, the window cannot receive insets.

Although the client will receive the correct window frame from relayout,
but the first WindowInsets has been dispatched before that.

This CL sends the size-compat scale to the client, so the client can use
the correct WindowConfiguration to compute frames.

This is also a step to enable the client to perform local window layout.

Bug: 237749017
Bug: 161810301
Bug: 175861127
Test: atest StartingSurfaceDrawerTests WindowAddRemovePerfTest
      ActivityRecordTests WindowManagerServiceTests
Change-Id: I6b23901f4b1f009444c04da7e078ea971a386ad7
2022-07-27 14:10:10 +08:00
TreeHugger Robot
af58ad5dd7 Merge "[pm] fix VerifierDeviceIdentityTest" 2022-07-26 15:44:29 +00:00
Jay Thomas Sullivan
d049e2d73a Add REQUESTED_PERMISSION_IMPLICIT flag
This adds a new permission flag, REQUESTED_PERMISSION_IMPLICIT, which
denotes that a permission is an implicitly-requested permission.

The concept of an implicit permission already existed (we just didn't
have a flag for it) and means that the permission acts as a "requested
permission" despite not being explicitly requested in the
AndroidManifest.xml as a <uses-permission>. For example, split
permissions result in implicit permissions, as well as a few unique
permissions.

Bug: 195016052
Test: atest ImplicitFlagTest
Change-Id: I5aaff487d653767b50fda7860d6fd0434a088dee
2022-07-25 15:43:29 -07:00
TreeHugger Robot
3215e0b57e Merge "[ApplicationInfo] update doc on splitSourceDirs" 2022-07-25 20:32:55 +00:00
Songchun Fan
5aaf950bbd [pm] fix VerifierDeviceIdentityTest
Bug: 208373220
Fixes: 208373220
Test: atest android.content.pm.VerifierDeviceIdentityTest
Change-Id: Id69918ab72d22530a5d4b32ea48d21af69802f2f
2022-07-25 12:14:29 -07:00
Louis Chang
baec1d5cb4 Avoid configuration not updated after reasonable configuration changes
Considering the sequence has wrapped around if the sequence number has
a significant large jump. Obviously the original value (0x10000) is not
big enough nowadays.

Also taking the negative jump into account, where the wrap around may
happen on the `other` configuration.

Bug: 239371596
Test: ConfigurationTest
Change-Id: I8ac5ee8c1589b68e63e8e29f961c7fcba719949e
2022-07-25 10:06:40 +00:00
Songchun Fan
e3005501a4 [ApplicationInfo] update doc on splitSourceDirs
BUG: 196018927
Test: n/a
Change-Id: I9e3c2e4387618bfcddd48d050f0ebd588382815d
2022-07-23 12:26:37 -07:00
Alex Buynytskyy
13f061e530 Merge "Use the same application info instance." into tm-qpr-dev am: dd7853a610
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19348154

Change-Id: Iea1b37ce6b217bbd1f621598eab67ba2462b5195
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 20:15:19 +00:00
Alex Buynytskyy
da1a68e6f6 Use the same application info instance.
Bug: 238461609
Fixes: 238461609
Test: Follow the repro steps in the bug.
Change-Id: I0432ad981d8bd15d10874bc07bb89dfa0574eba5
2022-07-20 18:16:57 +00:00
Alex Buynytskyy
f14298b70c Use the same application info instance.
Bug: 238461609
Fixes: 238461609
Test: Follow the repro steps in the bug.
Change-Id: I0432ad981d8bd15d10874bc07bb89dfa0574eba5
2022-07-20 11:15:26 -07:00
Ömer Yaveroğlu
c6ba7aea03 Fix the bug where the added field into the toString implementation does
not have a corresponding %s formatting.

Bug: 239134974
Test: atest frameworks/base/core/tests/coretests/src/android/content/integrity
Test: atest services/tests/servicestests/src/com/android/server/integrity
Change-Id: Ib9c3ecadfc5a823cd4fcd44237b25900f86b4e5c
2022-07-15 12:21:14 +00:00
Nikita Dubrovsky
22f3baa869 Deprecate and no-op test API getContentCaptureServicePackageName
After the fix for b/222231605, permission pre-grants are no longer tied
to the package that provides ContentCaptureService, so this test API is
no longer needed. However the API is still referenced from GTS tests
(though it won't be invoked on T and above), so we need to keep the
method in the SDK to compile the test code.

Bug: 229662628
Test: Presubmit
Change-Id: Iddc201ba8afde816446377e509a3f2de35215f61
2022-07-12 22:43:36 -07:00
Achim Thesmann
e67d8a101d Merge "Add attribution tag to clipboard." into tm-qpr-dev am: c761b5c52b am: 1072878a16
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19064995

Change-Id: I7b0fe7637c229b322a485201cabbb0448a9bafe6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 17:48:21 +00:00
Achim Thesmann
1072878a16 Merge "Add attribution tag to clipboard." into tm-qpr-dev am: c761b5c52b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19064995

Change-Id: I2889d27fbc1e0c88ee191300214cdf752e2b06a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 17:31:29 +00:00
Achim Thesmann
c761b5c52b Merge "Add attribution tag to clipboard." into tm-qpr-dev 2022-07-07 17:16:35 +00:00
Treehugger Robot
ce404eb866 Merge "Fix javadoc typo in ApplicationInfo" am: 2df3ef5db3 am: a447ff12be am: 1c1b1fd00c am: f2be111206 am: 08e0f8fc5e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142995

Change-Id: I30e98f086dc39a1bc1a67a96e6fc207d2ccf0f4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 19:19:50 +00:00
Treehugger Robot
08e0f8fc5e Merge "Fix javadoc typo in ApplicationInfo" am: 2df3ef5db3 am: a447ff12be am: 1c1b1fd00c am: f2be111206
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142995

Change-Id: I2af2642130e146ff3bedec42a32b44308ca22cfc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 18:57:21 +00:00
Treehugger Robot
1c1b1fd00c Merge "Fix javadoc typo in ApplicationInfo" am: 2df3ef5db3 am: a447ff12be
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142995

Change-Id: I7ab4d98c0df25194c0646d62217239786997bafc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 18:40:35 +00:00
Treehugger Robot
a447ff12be Merge "Fix javadoc typo in ApplicationInfo" am: 2df3ef5db3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142995

Change-Id: I5a96141c8fa3c4fef781639fb9171645371c088b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 18:21:56 +00:00
Hani Kazmi
4f221e5c51 Migrate Bundle/Intent APIs to new, type checked, variants
Part of go/safer-parcel. Follow up to ag/16639043. Migrates the following unsafe APIs:

* Parcel.readArray()
* Parcel.readParcelableArray()
* Bundle.getSerializable()
* Bundle.getParcelable()
* Bundle.getParcelableArrayList()
* Bundle.getParcelableArray()
* Bundle.getSparseParcelableArray()
* Intent.getSerializableExtra()
* Intent.getParcelableExtra()
* Intent.getParcelableArrayExtra()
* Intent.getParcelableArrayListExtra

Bug: 227458983
Test: m and presubmit pass
Change-Id: I72f206cb18eb5c669a7fff07a6845bed1c433fdb
2022-07-01 10:53:53 +00:00
Matthew Zavislak
63d4f7eb82 Fix javadoc typo in ApplicationInfo
- FLAG_SYSTEM had a small typo

Test: Documentation only, not needed
Change-Id: Iaa27b7ccac6090658e5f893778997a6ce850b8b0
2022-06-30 22:19:35 -07:00
Etan Cohen
10546ff698 Replace "NYC" with "Android 7" in javadoc
Bug: b/237377634
Change-Id: Iaf86b8b382c9ddd4e8107c5b1cae610f64ef8c79
Test: N/A
2022-06-29 02:07:49 +00:00
TreeHugger Robot
3cb72a002c Merge "Correctly parse minSdk even when targetSdk is a codename" into tm-dev am: 2fb8b2d84c am: 657e9583c3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19087061

Change-Id: Ib4e80eb6214222a66e4a513df6376a64ec541d56
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:30:06 +00:00
TreeHugger Robot
e97c7c78be Merge "Correctly parse minSdk even when targetSdk is a codename" into tm-dev am: 2fb8b2d84c am: f65074527b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19087061

Change-Id: Ie8cac29bc1912176f231fc50764db4ba96d7e88f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 18:29:22 +00:00
Roopa Sattiraju
e2abe03206 API changes requires for Bluetooth apk inside the apex to build.
Bug: 216731966
Test: Compile and Test
Cherry-picked from tm-dev
Merged-In: Ic8e9c2db0743738b2b6649451c79a559c3b8edc5

Change-Id: Ic8e9c2db0743738b2b6649451c79a559c3b8edc5
2022-06-27 16:35:47 -07:00
Winson Chiu
bcf5b69c41 Correctly parse minSdk even when targetSdk is a codename
The code that assigned target to min if min was not specified was
only checking for min codenames, but if the manifest specified a
numerical minSdkVersion, that is valid and would incorrectly prevent
the package from installing.

Bug: 237059024

Test: mts-tradefed > mts-eng-only -m ApkInApexTest

Change-Id: I3a2b9baa82ebb8ca9031c9fa128ce12bff17226e
2022-06-27 18:29:39 +00:00
Jeremy Meyer
469b166334 Merge "Allow string type when fabricating FRROs" 2022-06-27 15:08:50 +00:00
TreeHugger Robot
e81a24de79 Merge "Exclude large tests from presubmit." 2022-06-25 00:47:57 +00:00
Kweku Adams
b676071898 Exclude large tests from presubmit.
Bug: 222555677
Test: N/A
Change-Id: Ib19a2096a97367b37b3a22033ec2001693f23bff
2022-06-24 19:12:34 +00:00
Achim Thesmann
0e3e509b3b Add attribution tag to clipboard.
Bug: 235542330
Test: ClipboardManagerTest ClipboardAutoClearTest ClipboardManagerTest ClipboardManagerListenerTest ClipboardAccessTest ClipboardAccessTest
Test: manually tested copy-paste
Change-Id: I122a48a299f890ac565afb1042615edfa263b1c7
2022-06-24 15:57:17 +00:00
Tiger Huang
676f060ada Merge "Send the attached frame to the client" into tm-qpr-dev am: 228988d5e7 am: 9dbae141fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17860764

Change-Id: I35ea6111b8b706797eb724481bb9f07bc95fc8d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 06:51:51 +00:00
Tiger Huang
157514510f Send the attached frame to the client
The attached frame is the frame of the parent window that its child
attaches to, as long as the child is not
TYPE_APPLICATION_ATTACHED_DIALOG. It is a factor while computing the
window frame.

Previously, we let the child obtain the attached frame from its parent
view root. However, if the parent and the child are not in the same
process, it can be tricky.

This CL sends the attached frame from the server to the client via
ClientWindowFrames. In this way, the child can compute its window frame
without having to accessing the parent view root.

Bug: 161810301
Bug: 175861127
Test: atest ActivityRecordTests WindowLayoutTests
Change-Id: Ia844a4c927027e305a56114216eaee2bf7933b1f
2022-06-20 21:09:40 +08:00
Vadim Caen
aa48dc3c2d Prevent callback registration when back flag is disabled
When the enableOnBackInvokedCallback is set to false (or not set),
registering an OnBackInvokedCallback should be a no-op to avoid
overriding the default compat callback.

Test: Manual testing registering a callback on an app with the flag
disabled and doing a back gesture. Currently we don't have test
executing a back gesture so automated tests are not possible

Bug: 235206960

Change-Id: I54d843f11130a78ed5a68cbe4722e601a2086ee1
2022-06-16 12:41:46 +00:00
Jeremy Meyer
05466592a3 Allow string type when fabricating FRROs
This includes all of the work of passing the string all the way down to
the native code but then does nothing with it. Storing and retrieving of
it will be in follow up changes.

Test: Manual
Bug: 232940948
Change-Id: Ie00cc23680a0132588744991bf829afad6ba336f
2022-06-15 22:46:59 +00:00
TreeHugger Robot
b40311e6fa Merge "Fix typo in reference docs" 2022-06-13 22:14:13 +00:00
Christopher Tate
705f300b41 Fix typo in reference docs
Fixes: 214900783
Test: m offline-sdk-docs
Change-Id: Ib95c8fb0fd2e0ea89679bdc74713225b3eaf14ab
2022-06-13 10:11:33 -07:00
Yurii Zubrytskyi
6444ca0aca Merge changes from topic "Tiramisu-SDK-Finalization-revert-hack" into tm-dev am: 120aa88d0d am: 4226e4b4e4 am: aed3061fec am: bd1e5cd3c5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18764290

Change-Id: I5d5e4e78b35071f90e6c8b5835d09f538d2adc31
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-11 09:12:51 +00:00
Yurii Zubrytskyi
4c2b5c8470 Merge changes from topic "Tiramisu-SDK-Finalization-revert-hack" into tm-dev am: 120aa88d0d am: 801d350fff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18764290

Change-Id: Ia19898c436e9b168efebc363ec19e9d3f10084a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-11 08:38:11 +00:00
Yurii Zubrytskyi
bd1e5cd3c5 Merge changes from topic "Tiramisu-SDK-Finalization-revert-hack" into tm-dev am: 120aa88d0d am: 4226e4b4e4 am: aed3061fec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18764290

Change-Id: Id43f749910e7d327cd0370071fc77de63af9267c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-11 08:37:40 +00:00
Yurii Zubrytskyi
f067137656 Revert "HACK: allow apps with pre-release SDK RESTRICT AUTOMERGE" am: 6f5250836d am: e189e7abbf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18561182

Change-Id: I410ce3b7d69bc05fdd4d0e470490c1953a919594
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-11 08:37:27 +00:00