summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-06-26Merge cherrypicks of ['googleplex-android-review.googlesource.com/22381002', ↵android-13.0.0_r70android-13.0.0_r69android13-qpr3-s8-releaseandroid13-qpr3-s7-releaseAndroid Build Coastguard Worker
'googleplex-android-review.googlesource.com/23661867'] into sparse-10317220-L65500000961600299. SPARSE_CHANGE: I7b3dcd06e7483fde745a1d56dfee7c4efc262ed7 SPARSE_CHANGE: Ifcdac241bfe33f44f5f03f1a6db682c57f0cd388 Change-Id: I1bb3331bf5553f9a1984dd7eb2c29d94651e8a14
2023-06-26Keyguard: use transition state for syncing occlude [RESTRICT AUTOMERGE]Robin Lee
Previously keyguard occlude state was passed in onAnimationCancelled which was not reliable for two reasons: (1) onAnimationCancelled is not called if the animation immediately finishes itself due to unhappiness at the contents of the transition it's been asked to play (eg. empty app list) (2) Clients have inconsistent handling of that paramter - some ignore it, some respect it, one may get passed wrong information by a local caller in mergeAnimation. Instead note the Keyguard flags at the start of every app transition and queue up a call to setKeyguardOccluded if the transition may cause a change. This should be sent after the animation is already finished. This is ideally similar to 140a05907d905e38aa5690320d26c90ca29bf772 (Run keyguard occlusion update after transitions) which was done for WmShell transitions. Test: atest KeyguardTests Test: atest ActivityLifecycleKeyguardTests Test: atest MultiDisplayKeyguardTests Test: atest MultiDisplayLockedKeyguardTests Bug: 286099078 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:831787c50d4d74913d5b12d344e25743760aa437) Merged-In: Ifcdac241bfe33f44f5f03f1a6db682c57f0cd388 Change-Id: Ifcdac241bfe33f44f5f03f1a6db682c57f0cd388
2023-06-26Cancel current animation instead of candidateRobin Lee
Otherwise everything along the way confidently ignores this and Keyguard doesn't even see the timeout and force-abort coming when it hits. This leaves an animation timer running for 950ms which sets occlude status on finish callback and causes unpleasant race conditions. Test: atest android.server.wm.KeyguardTests Test: specific case to be added in b/274003805 Bug: 275650364 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8ffedf11e398f9a6aa8b30cff5f06b102fd54536) Merged-In: I7b3dcd06e7483fde745a1d56dfee7c4efc262ed7 Change-Id: I7b3dcd06e7483fde745a1d56dfee7c4efc262ed7
2023-06-14Merge cherrypicks of ['googleplex-android-review.googlesource.com/22915959', ↵android-13.0.0_r68android-13.0.0_r67android13-qpr3-s6-releaseAndroid Build Coastguard Worker
'googleplex-android-review.googlesource.com/22599577', 'googleplex-android-review.googlesource.com/23083138', 'googleplex-android-review.googlesource.com/23034056', 'googleplex-android-review.googlesource.com/23090199', 'googleplex-android-review.googlesource.com/23330385', 'googleplex-android-review.googlesource.com/23410117', 'googleplex-android-review.googlesource.com/23210299', 'googleplex-android-review.googlesource.com/23352460', 'googleplex-android-review.googlesource.com/23412216', 'googleplex-android-review.googlesource.com/23386456', 'googleplex-android-review.googlesource.com/23473144', 'googleplex-android-review.googlesource.com/23430378', 'googleplex-android-review.googlesource.com/23449211', 'googleplex-android-review.googlesource.com/23475497', 'googleplex-android-review.googlesource.com/23438365', 'googleplex-android-review.googlesource.com/23505029'] into tm-qpr3-release. Change-Id: Ia037f97d53cadf497fb062c8269f7de6faa2c71b
2023-06-14Merge "Resolve StatusHints image exploit across user." into sc-v2-dev am: ↵Pranav Madapurmath
e371b3018f Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23465066 Fixes: 285211549 Fixes: 280797684 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3fc6dd50937d23c854fde540380c51fd451b1c55) Merged-In: Idd360f69fc9e5a9f32fd3ca76ec0440c8bb12cf4 Change-Id: Idd360f69fc9e5a9f32fd3ca76ec0440c8bb12cf4
2023-06-14Remove unnecessary padding codeLee Shombert
Bug: 213170822 Remove the code that CursorWindow::writeToParcel() uses to ensure slot data is 4-byte aligned. Because mAllocOffset and mSlotsOffset are already 4-byte aligned, the alignment step here is unnecessary. CursorWindow::spaceInUse() returns the total space used. The tests verify that the total space used is always a multiple of 4 bytes. Test: atest * libandroidfw_tests (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5d4afa0986cbc440f458b4b8db05fd176ef3e6d2) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c7e1590ea236576e5ae2ed1e1bcc14756c3363f2) Merged-In: I720699093d5c5a584283e5b76851938f449ffa21 Change-Id: I720699093d5c5a584283e5b76851938f449ffa21
2023-06-14Use Settings.System.getIntForUser instead of getInt to make sure user ↵Chandru S
specific settings are used Bug: 265431505 Test: atest KeyguardViewMediatorTest (cherry picked from commit 625e009fc195ba5d658ca2d78ebb23d2770cc6c4) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f223b95992115bba93a89e6c7ca53c269ea2c71d) Merged-In: I66a660c091c90a957a0fd1e144c013840db3f47e Change-Id: I66a660c091c90a957a0fd1e144c013840db3f47e
2023-06-14DO NOT MERGEMichael Mikhail
Verify URI permissions in MediaMetadata Add a check for URI permission to make sure that user can access the URI set in MediaMetadata. If permission is denied, clear the URI string set in metadata. Bug: 271851153 Test: atest MediaSessionTest Test: Verified by POC app attached in bug, image of second user is not the UMO background of the first user. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:277e7e05866a3da3c5871c071231b2b7c911d81e) Merged-In: I932d5d5143998db89d7132ced84faffa4a0bd5aa Change-Id: I932d5d5143998db89d7132ced84faffa4a0bd5aa
2023-06-14Visit URIs in themed remoteviews icons.Ioana Alexandru
Bug: 281018094 Test: atest RemoteViewsTest NotificationVisitUrisTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:634a69b7700017eac534f3f58cdcc2572f3cc659) Merged-In: I2014bf21cf90267f7f1b3f370bf00ab7001b064e Change-Id: I2014bf21cf90267f7f1b3f370bf00ab7001b064e
2023-06-14Check URIs in sized remote views.Ioana Alexandru
Bug: 277741109 Test: atest RemoteViewsTest (cherry picked from commit ae0d45137b0f8ea49a085bbce4d39f901685c4a5) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:902f020bc81e5b584d5cb0276568b888a728fc4a) Merged-In: Iceb33606da3a49b9638ab21aeae17a168c1b411a Change-Id: Iceb33606da3a49b9638ab21aeae17a168c1b411a
2023-06-14Fix PrivacyChip not visible issueJohannes Gallmann
Bug: 281807669 Test: Manual, i.e. posting the following sequence of events (within few milliseconds) to the scheduler and observe the behaviour with and without the fix: Mic in use -> Mic not in use -> Mic in use (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a45e1d045770eaabfdbf0e1212c9eb84caf1d565) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:20ea049a4a52dbc8d4e5ed957a2b6b9aa02a2f34) Merged-In: I9851e6ed4cb956d0459ef56251eb0ef3210764b8 Change-Id: I9851e6ed4cb956d0459ef56251eb0ef3210764b8
2023-06-14Update Pip launches to not enter pinned task if in background.Hani Kazmi
Addresses a BAL bypass where Pip could be started without the launcher being visible. Bug: 271576718 Test: atest CtsWindowManagerDeviceTestCases:PinnedStackTests Test: atest android.server.wm.BackgroundActivityLaunchTest#testPipCannotStartFromBackground (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b263d3beed7a412ac342c63956f213b70d6e2679) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:291d124257f6e46862a813305892b02b9a8f851c) Merged-In: Icfe0a17d7f6f127acaae8400a97e8bdc53fcc9ad Change-Id: Icfe0a17d7f6f127acaae8400a97e8bdc53fcc9ad
2023-06-14Validate ComponentName for MediaButtonBroadcastReceiverIván Budnik
This is a security fix for b/270049379. Bug: 270049379 Test: atest CtsMediaMiscTestCases (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c573c83a2aa36ca022302f675d705518dd723a3c) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ba546a306217389a8ff9e5e948612651fd496081) Merged-In: I05626f7abf1efef86c9e01ee3f077d7177d7f662 Change-Id: I05626f7abf1efef86c9e01ee3f077d7177d7f662
2023-06-14Implement visitUris for RemoteViews ViewGroupActionAdd.Ioana Alexandru
This is to prevent a vulnerability where notifications can show resources belonging to other users, since the URI in the nested views was not being checked. Bug: 277740082 Test: atest RemoteViewsTest NotificationVisitUrisTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:850fd984e5f346645b5a941ed7307387c7e4c4de) Merged-In: I5c71f0bad0a6f6361eb5ceffe8d1e47e936d78f8 Change-Id: I5c71f0bad0a6f6361eb5ceffe8d1e47e936d78f8
2023-06-14Check URIs in notification public version.Ioana Alexandru
Bug: 276294099 Test: atest NotificationManagerServiceTest NotificationVisitUrisTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:67cd169d073486c7c047b80ab83843cdee69bf53) Merged-In: I670198b213abb2cb29a9865eb9d1e897700508b4 Change-Id: I670198b213abb2cb29a9865eb9d1e897700508b4
2023-06-14Preserve flags for non-runtime permissions upon package update.Hai Zhang
PermissionManagerServiceImpl.restorePermissionState() creates a new UID permission state for non-shared-UID packages that have been updated (i.e. replaced), however the existing logic for non-runtime permission never carried over the flags from the old state. This wasn't an issue for much older platforms because permission flags weren't used for non-runtime permissions, however since we are starting to use them for role protected permissions (ROLE_GRANTED) and app op permissions (USER_SET), we do need to preserver the permission flags. This change merges the logic for granting and revoking a non-runtime permission in restorePermissionState() into a single if branch, and appends the logic to copy the flag from the old state in that branch. Bug: 283006437 Test: PermissionFlagsTest#nonRuntimePermissionFlagsPreservedAfterReinstall (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:98f78c885d2c9e5d88a4636b1ed36d723ca9261f) Merged-In: Iea3c66710e7d28c6fc730b1939da64f1172b08db Change-Id: Iea3c66710e7d28c6fc730b1939da64f1172b08db
2023-06-14On device lockdown, always show the keyguardBeverly
Manual test steps: 1. Enable app pinning and disable "Ask for PIN before unpinning" setting 2. Pin an app (ie: Settings) 3. Lockdown from the power menu Observe: user is brought to the keyguard, primary auth is required to enter the device. After entering credential, the device is still in app pinning mode. Test: atest KeyguardViewMediatorTest Test: manual steps outlined above Bug: 218495634 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:100ae42365d7fc8ba7d241e8c9a7ef6aa0cdb961) Merged-In: I9a7c5e1acadabd4484e58573331f98dba895f2a2 Change-Id: I9a7c5e1acadabd4484e58573331f98dba895f2a2
2023-06-14Ensure policy has no absurdly long stringsPavel Grafov
The following APIs now enforce limits and throw IllegalArgumentException when limits are violated: * DPM.setTrustAgentConfiguration() limits agent packgage name, component name, and strings within configuration bundle. * DPM.setPermittedAccessibilityServices() limits package names. * DPM.setPermittedInputMethods() limits package names. * DPM.setAccountManagementDisabled() limits account name. * DPM.setLockTaskPackages() limits package names. * DPM.setAffiliationIds() limits id. * DPM.transferOwnership() limits strings inside the bundle. Package names are limited at 223, because they become directory names and it is a filesystem restriction, see FrameworkParsingPackageUtils. All other strings are limited at 65535, because longer ones break binary XML serializer. The following APIs silently truncate strings that are long beyond reason: * DPM.setShortSupportMessage() truncates message at 200. * DPM.setLongSupportMessage() truncates message at 20000. * DPM.setOrganizationName() truncates org name at 200. Bug: 260729089 Test: atest com.android.server.devicepolicy (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:456dbcae5ae4bc0d8f73f8cb97b57c8de6958f9c) Merged-In: Idcf54e408722f164d16bf2f24a00cd1f5b626d23 Change-Id: Idcf54e408722f164d16bf2f24a00cd1f5b626d23
2023-06-14Verify URI permissions for notification shortcutIcon.Ioana Alexandru
Bug: 277593270 Test: atest NotificationManagerServiceTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:75d1ae1c2d49404c4be16ed7b50480fc16c0e4c4) Merged-In: Iaf2a9a82f18e018e60e6cdc020da6ebf7267e8b1 Change-Id: Iaf2a9a82f18e018e60e6cdc020da6ebf7267e8b1
2023-06-14Do not load drawable for wallet card if the card image icon iscreatedSilin Huang
with content URI. This prevents the primary user from accessing the secondary user's photos for QAW card images. Test: manually, atest Bug: 272020068 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ff753ae693065685d85bbda6af2953905fdf434c) Merged-In: I6932c5131b3c795bac4ea9b537938e7ef4f3ea4e Change-Id: I6932c5131b3c795bac4ea9b537938e7ef4f3ea4e
2023-06-14ActivityManagerService: Allow openContentUri from vendor/system/product.Austin Borger
Apps should not have direct access to this entry point. Check that the caller is a vendor, system, or product package. Test: Ran PoC app and CtsMediaPlayerTestCases. Bug: 236688380 (cherry picked from commit d0ba7467c2cb2815f94f6651cbb1c2f405e8e9c7) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e37820e47c383aecf9d1173a0676c27e6a59ce4f) Merged-In: I0335496d28fa5fc3bfe1fecd4be90040b0b3687f Change-Id: I0335496d28fa5fc3bfe1fecd4be90040b0b3687f
2023-05-31[coastguard skipped] Merge sparse cherrypicks from ↵Android Build Coastguard Worker
sparse-10217051-L92600000960987363 into tm-qpr3-release. COASTGUARD_SKIP: I02ddaa5e823379510e9c81a8d803d5269e6d85ad COASTGUARD_SKIP: Idb5cfe95571ccd635488ebdcbf0de1dff247dca3 COASTGUARD_SKIP: If1c14cc0a4e3fbdfbed2c105d37ece9a866f18ed Change-Id: Iee30588023e26135eb82cb219d76ca609b436453
2023-05-31Merge cherrypicks of ['googleplex-android-review.googlesource.com/23428200', ↵android-13.0.0_r63android13-qpr3-s5-releaseAndroid Build Coastguard Worker
'googleplex-android-review.googlesource.com/23479325'] into sparse-10217051-L92600000960987363. SPARSE_CHANGE: I02ddaa5e823379510e9c81a8d803d5269e6d85ad SPARSE_CHANGE: If1c14cc0a4e3fbdfbed2c105d37ece9a866f18ed Change-Id: Idb5cfe95571ccd635488ebdcbf0de1dff247dca3
2023-05-31USB: update logic for reporting playback and capture capability of USB devices.jiabin
Report USB devices support audio capture when there is a terminal whose subtype is ACI_OUTPUT_TERMINAL and terminal type is USB streaming and there is another terminal whose subtype is ACI_INPUT_TERMINAL and terminal type is not USB streaming. Report USB devices support audio playback when there is a terminal whose subtype is ACI_INPUT_TERMINAL and terminal type is USB streaming and there is another terminal whose subtype is ACI_OUTPUT_TERMINAL and terminal type is not USB streaming. Bug: 279151646 Bug: 278603582 Test: connect usb headset, dumpsys audio policy (cherry picked from commit 9a5cab13b4b31ba9bf66e90ef07312959aa391d3) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e8e0134c04822f8f08a6dfad1a0cb9441c95c361) Merged-In: If1c14cc0a4e3fbdfbed2c105d37ece9a866f18ed Change-Id: If1c14cc0a4e3fbdfbed2c105d37ece9a866f18ed
2023-05-31Remove ControlsProviderSelectorActivity finish onAnton Potapov
ControlsFavoritingActivity start When ControlsProviderSelectorActivity starts ControlsFavouritingActivity it uses ControlsActivity instance for transitions. ControlsActivity interacts with ControlsBindingController to get a list of controls. This interaction prevents load from happening because ControlsBindingController has a global state, and prevents users from adding a second Controls app. Removing finishing ControlsProviderSelectorActivity prevents ControlsActivity from being started. Test: manual with the steps from the bug Test: atest ControlsProviderSelectorActivityTest Fixes: 283070266 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:442c1002a8563c291c149d18e143e1880a82a27e) Merged-In: I02ddaa5e823379510e9c81a8d803d5269e6d85ad Change-Id: I02ddaa5e823379510e9c81a8d803d5269e6d85ad
2023-05-27[coastguard skipped] Merge sparse cherrypicks from ↵Android Build Coastguard Worker
sparse-10216780-L32300000960937408 into tm-qpr3-release. COASTGUARD_SKIP: I98618477a828eb72b2173af6988e804471139e81 COASTGUARD_SKIP: Ieea33d3005d3bfa29c5287899a6299f6ed666a36 COASTGUARD_SKIP: Ib4eef40a0f59512c669b069532e55d36293f9e1c COASTGUARD_SKIP: Ib3240c0b5037a3a20692c83e2daa8cd858125ca7 COASTGUARD_SKIP: I35ba4652a125c8c83e18138f0fb0a51f3ef65b73 COASTGUARD_SKIP: I2bfdc7801cec1b3aaa44f841d8a821214c6cb801 COASTGUARD_SKIP: I1c51c6f66cd6967651068de1ffc2e6e8566f5a46 COASTGUARD_SKIP: I62e829555c43136080ee4909f7dcf8c388165e9f COASTGUARD_SKIP: Ie12843d00c5336e5a472624205e4e4b9ec881cc5 COASTGUARD_SKIP: Ic7b1c4b40960fd04de9efbf4f6d7abee45c93025 COASTGUARD_SKIP: Ibd6d9a8377e4b5327a473f8b9adf4e569e826172 COASTGUARD_SKIP: I7bc69ddf1c1742bd800eea4068ce268dfd96d0e3 Change-Id: I685339b878e457a75c45e34890149dfd47f218db
2023-05-27Merge cherrypicks of ['googleplex-android-review.googlesource.com/22791220', ↵Android Build Coastguard Worker
'googleplex-android-review.googlesource.com/22569796', 'googleplex-android-review.googlesource.com/22670803', 'googleplex-android-review.googlesource.com/22901260', 'googleplex-android-review.googlesource.com/23053887', 'googleplex-android-review.googlesource.com/23054378', 'googleplex-android-review.googlesource.com/23103421', 'googleplex-android-review.googlesource.com/23048037', 'googleplex-android-review.googlesource.com/22733606', 'googleplex-android-review.googlesource.com/22912038', 'googleplex-android-review.googlesource.com/22915981'] into sparse-10216780-L32300000960937408. SPARSE_CHANGE: I7bc69ddf1c1742bd800eea4068ce268dfd96d0e3 SPARSE_CHANGE: Ib3240c0b5037a3a20692c83e2daa8cd858125ca7 SPARSE_CHANGE: Ibd6d9a8377e4b5327a473f8b9adf4e569e826172 SPARSE_CHANGE: Ie12843d00c5336e5a472624205e4e4b9ec881cc5 SPARSE_CHANGE: I98618477a828eb72b2173af6988e804471139e81 SPARSE_CHANGE: Ic7b1c4b40960fd04de9efbf4f6d7abee45c93025 SPARSE_CHANGE: Ib4eef40a0f59512c669b069532e55d36293f9e1c SPARSE_CHANGE: I62e829555c43136080ee4909f7dcf8c388165e9f SPARSE_CHANGE: I1c51c6f66cd6967651068de1ffc2e6e8566f5a46 SPARSE_CHANGE: I35ba4652a125c8c83e18138f0fb0a51f3ef65b73 SPARSE_CHANGE: I2bfdc7801cec1b3aaa44f841d8a821214c6cb801 Change-Id: Ieea33d3005d3bfa29c5287899a6299f6ed666a36
2023-05-27DO NOT MERGE Hide EmptyShadeView when on bouncerShawn Lee
Added a check to make sure EmptyShadeView is hidden when bouncer is showing. Bug: 267060171 Test: manually verified EmptyShadeView visibility (cherry picked from commit bef2be6757eec92391189c106e89b63176cd16c0) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2e640447d16c4e893927e2f76bda8b1073bb18f8) Merged-In: I2bfdc7801cec1b3aaa44f841d8a821214c6cb801 Change-Id: I2bfdc7801cec1b3aaa44f841d8a821214c6cb801
2023-05-27DO NOT MERGE Adding tests for updated EmptyShadeView logicShawn Lee
Tests for ag/22688474 Bug: 267060171 Test: tests run (cherry picked from commit 6a19675b120b497618259cbcdedde4ffb68389c8) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e6fe1a0ef1ebb9123f4ed943c8470a873efbaada) Merged-In: I35ba4652a125c8c83e18138f0fb0a51f3ef65b73 Change-Id: I35ba4652a125c8c83e18138f0fb0a51f3ef65b73
2023-05-27Prevent force showing system bars for TaskViewJerry Chang
Update the condition of force showing system bars to check adjacent tasks instead of checking multi-window windowing mode so it can distinguish from TaskView. Bug: 273495037 Test: atest TaskDisplayAreaTests DisplayPolicyTests InsetsPolicyTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2bd0fe76a6b4ef566386e1949e4db0cf0db16430) Merged-In: I1c51c6f66cd6967651068de1ffc2e6e8566f5a46 Change-Id: I1c51c6f66cd6967651068de1ffc2e6e8566f5a46
2023-05-27Improve first opaque activity candidate detectionMassimo Carli
To catch the right candidate as first opaque activity beneath a translucent one and handle normal permission dialog behaviour and smart links. Fixes: 278661668 Test: Run `atest WmTests:SizeCompatTests` (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:bcf680d064ea8921091bfc4620b6958adf79e8a2) Merged-In: I62e829555c43136080ee4909f7dcf8c388165e9f Change-Id: I62e829555c43136080ee4909f7dcf8c388165e9f
2023-05-27Invalidate buffers on transform changeJohn Reck
Fixes: 271419600 Test: repro steps on bug (cherry picked from commit 61c64472417a272ec2aa2fd38e0d1874dbf16319) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5545b1cc36fd47bb33d87875b451f9f5c870d8bf) Merged-In: Ib4eef40a0f59512c669b069532e55d36293f9e1c Change-Id: Ib4eef40a0f59512c669b069532e55d36293f9e1c
2023-05-27Skip letterboxing if the activity below is embeddedLouis Chang
Embedded activities are resize-able and won't be letterboxed Bug: 270681405 fixes: 280898266 Test: SizeCompatTests Test: manual - repro step in bug (cherry picked from commit b828087bbc1bfead31a9a4e2f54b162d04a10172) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ad7d89c22bf53fbcfd1f8d5a1ae2c611c376e9b3) Merged-In: Ic7b1c4b40960fd04de9efbf4f6d7abee45c93025 Change-Id: Ic7b1c4b40960fd04de9efbf4f6d7abee45c93025
2023-05-27Unfreeze the surface when the transition is doneLouis Chang
The surface was not unfreeze if the WindowContainer is closing and changing after [1]. Always check and unfreeze the surface if needed when the transition is done. [1] d19ad2aa09fd27ec11e626ab239babb929c32fd6 Bug: 280754787 Test: click web link on chat while having a Meet call (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f3a5c5892402916ca861c41319f21acb83bd1f83) Merged-In: I98618477a828eb72b2173af6988e804471139e81 Change-Id: I98618477a828eb72b2173af6988e804471139e81
2023-05-27[RESTRICT AUTOMERGE] Always set last report configuration for starting window.wilsonshih
The windows of an activity can be request to resize if the last report configration didn't set during relayout window before activity request visible. So there should excludes starting window since the starting window won't restart activity from configuration change. Bug: 276356396 Test: manual do quick switch on large screen device. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b6b5861513f372b32982df55052241ad3883a13a) Merged-In: Ie12843d00c5336e5a472624205e4e4b9ec881cc5 Change-Id: Ie12843d00c5336e5a472624205e4e4b9ec881cc5
2023-05-27Fix split cannot active if app trampoline launch new taskTony Huang
This reverts commit 2a47e6a6ed4d5fdc812e9c1ce3f60b5ff226f31c and commit 76ab53a384b16fbf07ffd4c11952ef687bd9bcc3. Both CL cause regression which lead to users cannot active split by some apps use trampoline launch new task on launcher icon. So fix it by revert both CLs. Other changes are also for fixing this case. There is a timing issue and we cannot ensure the old trampoline still remain under split root when we get remote animation callback. Fix it by only checking any children tasks are under split root or not. Bug: 278172065 Test: manual Test: pass existing tests (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6e29d4ddb8ab2cb9b66539c0b9bc3e15efe8b885) Merged-In: Ibd6d9a8377e4b5327a473f8b9adf4e569e826172 Change-Id: Ibd6d9a8377e4b5327a473f8b9adf4e569e826172
2023-05-27Update the timing of clearing SplitRequestTony Huang
We clean splitRequest after enter split and use it as a flag to do some function such as active split by child adjacent task if split invisible. However, in some cases, such as a task start another new task and finish it immediately. In this case, split active finished and split request reset but split still didn't invisible and new child task appeared, and it trigger function mentioned above then cause bug. To avoid such case, we should update the timing of clearing SplitRequest to cover trampoline tasks launch so it won't evict child tasks unexpectedly while entering split. Fix: 277556204 Test: manual Test: pass existing tests (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7ae38cb0c1c6d1da6b2c45e6b809199ca8900235) Merged-In: Ib3240c0b5037a3a20692c83e2daa8cd858125ca7 Change-Id: Ib3240c0b5037a3a20692c83e2daa8cd858125ca7
2023-05-27Gates RotationResolverService with a config flagYi Jiang
Bug: 266824653 Test: atest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8dd4fb802129344cd93314421552a72f37ab34ee) Merged-In: I7bc69ddf1c1742bd800eea4068ce268dfd96d0e3 Change-Id: I7bc69ddf1c1742bd800eea4068ce268dfd96d0e3
2023-05-27Merge cherrypicks of ['googleplex-android-review.googlesource.com/20219552', ↵android-13.0.0_r62android-13.0.0_r61android13-qpr3-s4-releaseAndroid Build Coastguard Worker
'googleplex-android-review.googlesource.com/20946190', 'googleplex-android-review.googlesource.com/22616881', 'googleplex-android-review.googlesource.com/21327525', 'googleplex-android-review.googlesource.com/22621774', 'googleplex-android-review.googlesource.com/22905438', 'googleplex-android-review.googlesource.com/17738545', 'googleplex-android-review.googlesource.com/21253698', 'googleplex-android-review.googlesource.com/22787457', 'googleplex-android-review.googlesource.com/22512482', 'googleplex-android-review.googlesource.com/22895638'] into tm-qpr3-release. Change-Id: Ic2c91796946025b03725b70797408b35331c862f
2023-05-27Visit URIs in landscape/portrait custom remote views.Ioana Alexandru
Bug: 277740848 Test: atest RemoteViewsTest NotificationManagerServiceTest & tested with POC from bug (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b4692946c10d11c1e935869e11dc709a9cdcba69) Merged-In: I7d3d35df0ec38945019f71755bed8797b7af4517 Change-Id: I7d3d35df0ec38945019f71755bed8797b7af4517
2023-05-27[RESTRICT AUTOMERGE] Prevent installing apps in policy restricted work ↵Sumedh Sen
profile using ADB If DISALLOW_DEBUGGING_FEATURES or DISALLOW_INSTALL_APPS restrictions are set on a work profile, prevent side loading of APKs using ADB in the work profile. Bug: 257443065 Test: atest CtsPackageInstallTestCases:UserRestrictionInstallTest (cherry picked from commit febe3918020a94b2af48ade98eb6a49cdd4a3bdf) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b988a09db551d9a8b2aeb0e8eb88e610605709e8) Merged-In: I169a1f72c84528ca606b6a4da165d4fbcd02b08d Change-Id: I169a1f72c84528ca606b6a4da165d4fbcd02b08d
2023-05-27Verify URI permissions for EXTRA_REMOTE_INPUT_HISTORY_ITEMS.Ioana Alexandru
Also added the person URIs in the test, since they weren't being checked. Test: atest NotificationManagerServiceTest & tested with POC from bug Bug: 276729064 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:43b1711332763788c7abf05c3baa931296c45bbb) Merged-In: I848545f7aee202495c515f47a32871a2cb6ae707 Change-Id: I848545f7aee202495c515f47a32871a2cb6ae707
2023-05-27[1-time permissions] Use internal api to check proc statesEvan Severson
We need to check the proc state and the binder method has a filter that is affected by a bug that keeps a killed a proces in the "pending top" list. Using the internal api isn't affected by this filter and also is more correct for inprocess calls. Test: Install test app that requests permission and will exit immediately on granting, observe permission is no longer indefinitely held. Bug: 254736794 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e836611f3057cf9eae589a34a39fe80d0a9145f3) Merged-In: I30579090c803b231fd750abbc4ad645805f7ece2 Change-Id: I30579090c803b231fd750abbc4ad645805f7ece2
2023-05-27Watch uid proc state instead of importance for 1-time permissionsEvan Severson
The system process may bind to an app with the flag BIND_FOREGROUND_SERVICE, this will put the client in the foreground service importance level without the normal requirement that foreground services must show a notification. Looking at proc states instead allows us to differentiate between these two levels of foreground service and revoke the client when not in use. This change makes the parameters `importanceToResetTimer` and `importanceToKeepSessionAlive` in PermissionManager#startOneTimePermissionSession obsolete. Test: atest CtsPermissionTestCases + manual testing with mic/cam/loc Bug: 217981062 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0be78fbbf7d92bf29858aa0c48b171045ab5057f) Merged-In: I7a725647c001062d1a76a82b680a02e3e2edcb03 Change-Id: I7a725647c001062d1a76a82b680a02e3e2edcb03
2023-05-27Truncate ShortcutInfo IdAndrás Kurucz
Creating Conversation with a ShortcutId longer than 65_535 (max unsigned short), we did not save the conversation settings into the notification_policy.xml due to a restriction in FastDataOutput. This put us to a state where the user changing the importance or turning off the notifications for the given conversation had no effect on notification behavior. Fixes: 273729476 Test: atest ShortcutManagerTest2 Test: Create a test app which creates a Conversation with a long shortcutId. Go to the Conversation Settings and turn off Notifications. Post a new Notification to this Conversation and see if it is displayed. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8a5223fcd59e805da510c31c5f8462c5d01ec6d5) Merged-In: I2617de6f9e8a7dbfd8fbeff589a7d592f00d87c5 Change-Id: I2617de6f9e8a7dbfd8fbeff589a7d592f00d87c5
2023-05-27Dismiss keyguard when simpin auth'd and...Aaron Liu
security method is none. This is mostly to fix the case where we auth sim pin in the set up wizard and it goes straight to keyguard instead of the setup wizard activity. This works with the prevent bypass keyguard flag because the device should be noe secure in this case. Fixes: 222446076 Test: turn locked sim on, which opens the sim pin screen. Auth the screen and observe that keyguard is not shown. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:48fa9bef3451e4a358c941af5b230f99881c5cb6) Cherry-picking this CL as a security fix Bug: 222446076 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:65ea56f54c059584eb27ec53d486dba8161316ab) Merged-In: Id302c41f63028bc6dd58ba686e23d73565de9675 Change-Id: Id302c41f63028bc6dd58ba686e23d73565de9675
2023-05-27Only allow NEW_TASK flag when adjusting pending intentsWinson Chung
Bug: 243794108 Test: atest CtsSecurityBulletinHostTestCases:android.security.cts.CVE_2023_20918 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c62d2e1021a030f4f0ae5fcfc8fe8e0875fa669f) Merged-In: I5d329beecef1902c36704e93d0bc5cb60d0e2f5b Change-Id: I5d329beecef1902c36704e93d0bc5cb60d0e2f5b
2023-05-27Grant URI permissions to the CallStyle-related onesMatías Hernández
This will also verify that the caller app can actually grant them. Fix: 274592467 Test: atest NotificationManagerServiceTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4dee5aab12e95cd8b4d663ad050f07b0f2433596) Merged-In: I83429f9e63e51c615a6e3f03befb76bb5b8ea7fc Change-Id: I83429f9e63e51c615a6e3f03befb76bb5b8ea7fc
2023-05-27Revert "Ensure that only SysUI can override pending intent launch flags"Winson Chung
This reverts commit c4d3106e347922610f8c554de3ae238175ed393e. Reason for revert: b/264884187, b/264885689 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:48acfb0f1d71912e757cadd505901471c1df4d4c) Merged-In: I9fb0d66327f3f872a92e6b9d682d58489e81e6ba Change-Id: I9fb0d66327f3f872a92e6b9d682d58489e81e6ba
2023-05-27Ensure that only SysUI can override pending intent launch flagsWinson Chung
- Originally added in ag/5139951, this method ensured that activities launched from widgets are always started in a new task (if the activity is launched in the home task, the task is not brough forward with the recents transition). We can restrict this to only recents callers since this only applies to 1p launchers in gesture nav (both the gesture with 3p launchers and button nav in general will always start the home intent directly, which makes adding the NEW_TASK flag unnecessary). Bug: 243794108 Test: Ensure that the original bug b/112508020 still works (with the test app in the bug, swipe up still works after launching an activity from the widget, and fails without applying the override flags) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c4d3106e347922610f8c554de3ae238175ed393e) Merged-In: Id53c6a2aa6da5933d488ca06a0bfc4ef89a4c343 Change-Id: Id53c6a2aa6da5933d488ca06a0bfc4ef89a4c343