summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-12-11Merge cherrypicks of ['googleplex-android-review.googlesource.com/24077613', ↵android-platform-11.0.0_r40android-platform-11.0.0_r39android11-platform-releaseAndroid Build Coastguard Worker
'googleplex-android-review.googlesource.com/25102101', 'googleplex-android-review.googlesource.com/25064728', 'googleplex-android-review.googlesource.com/23262449', 'googleplex-android-review.googlesource.com/24708693', 'googleplex-android-review.googlesource.com/25369997'] into rvc-platform-release. Change-Id: I142162ace2d0edb4a7fbc487cf9295f6a4a2886a
2023-12-11[DO NOT MERGE] Enforce persisted snoozed notifications limitsValentin Iftime
Prevent DoS attack that causes boot-looping by serializing a huge amount of snoozed notifications: - Check snooze limits for persisted notifications - Remove persisted group summary notification when in-memory counterpart is removed - Prevent unpriviledged API calls that allow 3P apps to snooze notifications with context/criterion Test: atest SnoozeHelperTest Test: atest NotificationManagerServiceTest Bug: 307948424 Bug: 308414141 (cherry picked from commit 965ff2d3c5487f72a77f6153ed8542cb2621d93c) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:87c11b6df3d6ba696a8978a01ef5d66aeab45c8f) Merged-In: I3571fa9207b778def652130d3ca840183a9a8414 Change-Id: I3571fa9207b778def652130d3ca840183a9a8414
2023-12-11[RESTRICT AUTOMERGE] Check permission of Autofill icon URIsTim Yu
* SaveUI's template * Inline Suggestions slices Fixes: b/286235483 Fixes: b/292104015 Test: atest CtsAutoFillServiceTestCases (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9b03491b9ddefd0c13c013ec9dc3265810995ad9) Merged-In: I48879174664b70ced90492bb0991dc91cbf89b79 Change-Id: I48879174664b70ced90492bb0991dc91cbf89b79
2023-12-11Restrict activity launch when caller is running in the backgroundChristophe Pinelli
Test: test on device + atest-src BackgroundActivityLaunchTest#testBackgroundActivityBlockedInStartNextMatchingActivity Bug: 230492947 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d8368be4f8fb7019ea24b4798f029301c704092c) Merged-In: I7ae88eb62e435b9a77d2a724c5a953fe1f35b838 Change-Id: I7ae88eb62e435b9a77d2a724c5a953fe1f35b838
2023-12-11Unbind TileService onNullBindingFabián Kozynski
Test: atest TileLifecycleManagerTest Test: manual: adb shell dumpsys activity service Test: sts test Bug: 300903792 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7bf830ca0df71496cd47563e138b8712918e0476) Merged-In: Ia8126ac65432b124683960e3ebf47301ba6172a1 Change-Id: Ia8126ac65432b124683960e3ebf47301ba6172a1
2023-12-11DO NOT MERGE: "Hide" /Android/data|obb|sanbox/ on shared storageSergey Nikolaienkov
Implement shouldHideDocument() in the ExternalStorageProvider so that it resitcts access to 'Android/data/', 'Android/obb/' and 'Android/sandbox' on the integrated shared storage along with all their content and subdirectories. Clean up the abstract FileSystemProvider, specifically all variants of queryChildDocuments(). Bug: 200034476 Bug: 220066255 Bug: 283962634 Test: make & flash systemimage, run manually Test: atest ExternalStorageProviderTests (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:364ba60e061893f82e29761c48d8f09397715c19) Merged-In: I48c2ce7ff2d7fc067961ea2af0ea63818316f086 Change-Id: I48c2ce7ff2d7fc067961ea2af0ea63818316f086
2023-12-11DO NOT MERGE Disallow Wallpaper service to launch activity from background.Nan Wu
Add a flag so that when a foreground client binds to a service, disallow the bound service to launch activity from background. Modify the WallpaperManagerService to take advantage of the new flag. Test: atest BackgroundActivityLaunchTest WallpaperManagerServiceTests Bug: 261072174 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4c065abfaf59bdc237f65ceb9704d76bf0819d3a) Merged-In: Id4e4cb6144597cf3638f2aaa34ea455a239fa1a7 Change-Id: Id4e4cb6144597cf3638f2aaa34ea455a239fa1a7
2023-11-28Merge cherrypicks of ['googleplex-android-review.googlesource.com/24413973', ↵android-platform-11.0.0_r38Android Build Coastguard Worker
'googleplex-android-review.googlesource.com/24656668', 'googleplex-android-review.googlesource.com/24867204', 'googleplex-android-review.googlesource.com/25174238', 'googleplex-android-review.googlesource.com/25238611'] into rvc-platform-release. Change-Id: Icc01302f08307b72b4e9fe6d3014449b0f00dae0
2023-11-28Fix vulnerability that allowed attackers to start arbitary activitiesWill Leshner
Test: Flashed device and verified dream settings works as expected Test: Installed APK from bug and verified the dream didn't allow launching the inappropriate settings activity. Fixes: 300090204 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6926fd15fb16c51468dde270bd61ee68772b8c14) Merged-In: I573040df84bf98a493b39f96c8581e4303206bac Change-Id: I573040df84bf98a493b39f96c8581e4303206bac
2023-11-28RESTRICT AUTOMERGENan Wu
Log to detect usage of whitelistToken when sending non-PI target Log ActivityManagerService.sendIntentSender if the target is not a PendingIntent and a non-null whitelistToken is sent to the client. This is simply to detect if there are real cases this would happen before we decide simply remove whitelistToken in that case. Do not pass whitelistToken when sending non-PI target In ActivityManagerService.sendIntentSender, if the target is not a PendingIntent, do not send whitelistToken to the client. Bug: 279428283 Test: Manual test (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5f12deecd46e79212deba584a1afea97d401dd52) Merged-In: I017486354a1ab2f14d0472c355583d53c27c4810 Change-Id: I017486354a1ab2f14d0472c355583d53c27c4810
2023-11-28[CDM] Validate component name length before requesting notification access.Raphael Kim
Bug: 295335110 Test: Test app with long component name (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3ab14638b137bb5626651a24afca5c09dc4306cf) Merged-In: I7ea5d5c1f78858db9865f3310d1e0aff9c8b5579 Change-Id: I7ea5d5c1f78858db9865f3310d1e0aff9c8b5579
2023-11-28Truncate user data to a limit of 500 charactersTetiana Meronyk
Fix vulnerability that allows creating users with no restrictions. This is done by creating an intent to create a user and putting extras that are too long to be serialized. It causes IOException and the restrictions are not written in the file. By truncating the string values when writing them to the file, we ensure that the exception does not happen and it can be recorded correctly. Bug: 293602317 Test: install app provided in the bug, open app and click add. Check logcat to see there is no more IOException. Reboot the device by either opening User details page or running adb shell dumpsys user | grep -A12 heen and see that the restrictions are in place. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:48d45b507df64708a214a800082b970c8b2bf827) Merged-In: I633dc10974a64ef2abd07e67ff2d209847129989 Change-Id: I633dc10974a64ef2abd07e67ff2d209847129989
2023-11-28DO NOT MERGE Ensure finish lockscreen when usersetup incompleteAaron Liu
Ensure that when the usersetup for the user is not complete, we do not want to go to lockscreen, even if lockscreen is not disabled. Bug: 222446076 Test: add Unit test, Test: Wipe device, auth sim pin in setup, observe that lockscreen is not there. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:01ea2f91df5a1c67da2546d83beeee75c2c1ef94) Merged-In: I8e33db8eb6e2c917966cab3d6a4f982670473040 Change-Id: I8e33db8eb6e2c917966cab3d6a4f982670473040
2023-10-23Merge cherrypicks of ['googleplex-android-review.googlesource.com/24341230'] ↵android-platform-11.0.0_r37Android Build Coastguard Worker
into rvc-platform-release. Change-Id: I7ec87dc70b946748cb6fc97d2c86fed22624ab80
2023-10-23Require permission to unlock keyguardMarzia Favaro
Bug: 288896339 Test: Manual, verify that the app which can be found on the bug can no longer call keyguardGoingAway successfully Require permission to unlock keyguard Bug: 288896339 Test: Manual, verify that the app which can be found on the bug can no longer call keyguardGoingAway successfully (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:bd2aa5d309c5bf8e73161975bd5aba7945b25e84) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:dff40f2a5d839d82eedc7d0d4054e68e51e50915) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9ef8ef1dc556431609443b031ce73bbce2ddb59c) Merged-In: I7ba7e56f954c8e6f1f734311f735215918975bc6 Change-Id: I7ba7e56f954c8e6f1f734311f735215918975bc6
2023-10-18Merge cherrypicks of ['googleplex-android-review.googlesource.com/23918399', ↵Android Build Coastguard Worker
'googleplex-android-review.googlesource.com/24420753', 'googleplex-android-review.googlesource.com/20064770', 'googleplex-android-review.googlesource.com/24046929', 'googleplex-android-review.googlesource.com/23623109', 'googleplex-android-review.googlesource.com/24608564', 'googleplex-android-review.googlesource.com/24182288', 'googleplex-android-review.googlesource.com/24761005', 'googleplex-android-review.googlesource.com/24058898', 'googleplex-android-review.googlesource.com/24805807', 'googleplex-android-review.googlesource.com/24640916'] into rvc-platform-release. Change-Id: If84a28658880cc848f33774cca8fff6b5122c8b9
2023-10-18RESTRICT AUTOMERGE: Check URI permissions for resumable media artworkBeth Thibodeau
When resumable media is added that has artwork set via URI, check the permissions for the URI before attempting to load it Test: atest MediaDataManagerTest UriGrantsManagerServiceTest Test: manual with test app Bug: 284297452 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:552ec32590308b7488038b6208446d9450063833) Merged-In: Ie79915d3d1712f08dc2e8dfbd5bc7fd32bb308a3 Change-Id: Ie79915d3d1712f08dc2e8dfbd5bc7fd32bb308a3
2023-10-18Updated: always show the keyguard on device lockdownBeverly Tai
Additionally, don't hide keyguard when it's disabled if the user has locked down the device. 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 4. Observe: user is brought to the keyguard, primary auth is required to enter the device. => After entering correct credential, the device is still in app pinning mode. => After entering an incorrect credential, the keyguard remains showing and the user can attempt again up to the limit Bug: 300463732 Bug: 218495634 Test: atest KeyguardViewMediatorTest Test: manual (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:35a6e2f2c952440b1102033b2c3e496438503cff) Merged-In: I70fdae80f717712b3dfc9df54b9649959b4bb8f0 Change-Id: I70fdae80f717712b3dfc9df54b9649959b4bb8f0
2023-10-18Adding in verification of calling UID in onShellCommandKunal Malhotra
Test: manual testing on device Bug: b/261709193 (cherry picked from commit b651d295b44eb82d664861b77f33dbde1bce9453) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3ef3f18ba3094c4cc4f954ba23d1da421f9ca8b0) Merged-In: I68903ebd6d3d85f4bc820b745e3233a448b62273 Change-Id: I68903ebd6d3d85f4bc820b745e3233a448b62273
2023-10-18Revert "On device lockdown, always show the keyguard"Beverly Tai
This reverts commit b23c2d5fb6630ea0da503b937f62880594b13e94. Reason for revert: b/300463732 regression Bug: 300463732 Bug: 218495634 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f57217125f2b124c16c463ef4507fb054cc1ba4f) Merged-In: I31485d0d8caa3060e998636b071dbe03f6b4fc82 Change-Id: I31485d0d8caa3060e998636b071dbe03f6b4fc82
2023-10-18Validate userId when publishing shortcutsPinyao Ting
Bug: 288110451 Test: manual (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:01bfd04ff445db6290ae430d44ea1bf1a115fe3c) Merged-In: Idbde676f871db83825155730e3714f3727e25762 Change-Id: Idbde676f871db83825155730e3714f3727e25762
2023-10-18Use readUniqueFileDescriptor in incidentd servicePawan Wagh
readFileDescriptor doesn't provide ownership of the fds. fdopen needs ownership of the fds. Fds read from parcel should be duped in this scenario and readUniqueFileDescriptor dups fds internally. Test: m incidentd_service_fuzzer && adb sync data && adb shell /data/fuzz/x86_64/incidentd_service_fuzzer/incidentd_service_fuzzer Test: atest incidentd_test Bug: 286931110 Bug: 283699145 (cherry picked from commit ba78ef276951269f7b024baebdf1b8fa40bedb23) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6fe53e86ed4793a4bec9d677a75c1358c7c072ce) Merged-In: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e Change-Id: Ibe03a17dee91ac5bf25d123d4fd9c0bdd3c7d80e
2023-10-18Restrict number of shortcuts can be added through addDynamicShortcutsPinyao Ting
This CL fixes the issue where, when an app have multiple main activities, the total number of shortcuts can grow indefinitely if they were published through addDynamicShortcuts. Bug: 281061287 Test: manual (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2d93aabdc4905b36ee684533904029cfc61533b7) Merged-In: Ib3eecefee34517b670c59dd5b8526fe9eb24f463 Change-Id: Ib3eecefee34517b670c59dd5b8526fe9eb24f463
2023-10-18Validate URI-based shortcut icon at creation time.Pinyao Ting
Bug: 288113797 Test: manual (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3d41fb7620ffb9c81b23977c8367c323e4721e65) Merged-In: I392f8e923923bf40827a2b6207c4eaa262694fbc Change-Id: I392f8e923923bf40827a2b6207c4eaa262694fbc
2023-10-18RESTRICT AUTOMERGE: Drop invalid data.Kweku Adams
Drop invalid data when writing or reading from XML. PersistableBundle does lazy unparcelling, so checking the values during unparcelling would remove the benefit of the lazy unparcelling. Checking the validity when writing to or reading from XML seems like the best alternative. Bug: 246542285 Bug: 247513680 Test: install test app with invalid job config, start app to schedule job, then check logcat and jobscheduler persisted file (cherry picked from commit 666e8ac60a31e2cc52b335b41004263f28a8db06) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:68686110b8201eec24590419e7fc85810cbd8967) Merged-In: Ie817aa0993e9046cb313a750d2323cadc8c1ef15 Change-Id: Ie817aa0993e9046cb313a750d2323cadc8c1ef15
2023-10-18Visit Uris related to Notification style extrasMatías Hernández
Even if the corresponding styles themselves were not applied to the Notification.Builder. Test: atest NotificationManagerServiceTest Bug: 287640400 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a7e0c6585fd155d5bd9354b8b15516f4788c33a7) Merged-In: I25acab19be7dd486aabede8c91dbad5a1a217abf Change-Id: I25acab19be7dd486aabede8c91dbad5a1a217abf
2023-10-18Fix bypass BAL via `requestGeofence`Lifu Tang
Bug: 273729172 Test: manually (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7f9be7c3c859dc82d37452570d9878b58f6437a9) Merged-In: Ia8094244f908b20d42711b6ea8f58f9b3345b563 Change-Id: Ia8094244f908b20d42711b6ea8f58f9b3345b563
2023-09-20Merge cherrypicks of ['googleplex-android-review.googlesource.com/24304450'] ↵android-platform-11.0.0_r36Android Build Coastguard Worker
into rvc-platform-release. Change-Id: I517aa34c569a44d5b65d611b580e6176a7108d7c
2023-09-20Strips spans from AssistStructure textDaniel
When a new view becomes visible on the screen, the view notifies AutofillManager about its visibility. AutofillManager then requests the activity to compile an AssistStructure object which will contain the view hierarchy of the activity as well as texts contained inside all the views. If there are Span text fields that contain custom implementation of ClickableSpan, these spans are also copied over during the construction of the AssistStructure. By keeping the references to the ClickableSpan, it causes memory leak when the AssistStructure object outlives the activity. Test: atest CtsAutoFillServiceTestCases, atest CtsAssistTestCases, atest android.widget.cts.TextViewTest Bug: 146100180 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e42d05e3d01f4c3b8aa7bce29086cd968970b4ec) Merged-In: I1fd97d9d6fdc569d14529347fcb85da409c3c1ff Change-Id: I1fd97d9d6fdc569d14529347fcb85da409c3c1ff
2023-09-11Merge cherrypicks of ['googleplex-android-review.googlesource.com/23983047', ↵Android Build Coastguard Worker
'googleplex-android-review.googlesource.com/24323542', 'googleplex-android-review.googlesource.com/24309301', 'googleplex-android-review.googlesource.com/24183662', 'googleplex-android-review.googlesource.com/24424817'] into rvc-platform-release. Change-Id: Ic87efa3d0306f3adea084876d6aae6343d08395d
2023-09-11[SettingsProvider] verify ringtone URI before settingSongchun Fan
Similar to ag/24422287, but the same URI verification should be done in SettingsProvider as well, which can be called by apps via Settings.System API or ContentProvider APIs without using RingtoneManager. BUG: 227201030 Test: manual with a test app. Will add a CTS test. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1b234678ec122994ccbfc52ac48aafdad7fdb1ed) Merged-In: Ic0ffa1db14b5660d02880b632a7f2ad9e6e5d84b Change-Id: Ic0ffa1db14b5660d02880b632a7f2ad9e6e5d84b
2023-09-11RESTRICT AUTOMERGE Make log reader thread a class memberVova Sharaienko
pushedEventThread references class members after detaching. Making pushedEventThread as class member and joining in statsService destructor. Adding a method to stop readLogs thread. Ignore-AOSP-First: Bug is in still security triage and fuzzer is crashing on startup. Test: atest statsd_test Test: m statsd_service_fuzzer && adb sync data && adb shell /data/fuzz/arm64/statsd_service_fuzzer/statsd_service_fuzzer -runs=10000 Bug: 285645039 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5a0f6c5b8e23b355dab1fc7ac392274e0b5aa71c) Merged-In: I1e886f9ccb7203714216da061c35e793b2a63d8a Change-Id: I1e886f9ccb7203714216da061c35e793b2a63d8a
2023-09-11Use type safe API of readParcelableArraykumarashishg
Bug: 291299076 Test: Build and flash the device and check if it throws exception for non UsbInterface object Test: atest CtsUsbManagerTestCases (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:85d7e6712a9eeeed3bdd68ea3c3862c7e88bfe70) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:58b3271279320b9d9cbf12f64eca4df97f6f14c0) Merged-In: I2917c8331b6d56caaa9a6479bcd9a2d089f5f503 Change-Id: I2917c8331b6d56caaa9a6479bcd9a2d089f5f503
2023-09-11[DO NOT MERGE] Check caller's uid in backupAgentCreated callbackPiyush Mehrotra
AM.backupAgentCreated() should enforce that caller belongs the package called in the API. Bug: 289549315 Test: atest android.security.cts.ActivityManagerTest#testActivityManager_backupAgentCreated_rejectIfCallerUidNotEqualsPackageUid (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3daa6a20ea4b7fc5ee8165d25e77a21c5ab208fc) Merged-In: I9f3ae5ec0b8f00e020d471cc0eddf8bd8bdbb82d Change-Id: I9f3ae5ec0b8f00e020d471cc0eddf8bd8bdbb82d
2023-09-11DO NOT MERGE Fix BAL via notification.publicVersionNan Wu
We stripped the token that allows app to retrieve their own notification and fire their own PI to launch activities from background. But we forgot to strip the token from notification.publicVersion Bug: 278558814 Test: NotificationManagerTest#testActivityStartFromRetrievedNotification_isBlocked (cherry picked from commit cf851d81a954f0a6dd0c2fd7defa93932539e7f9) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1896c2e7068c9ec1ab8355d863d7e8107d5d5706) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:75fcbb37617246c43c2af34b12c9ae4b4043f9ac) Merged-In: I8f25d7a5e47890a0496af023149717e1df482f98 Change-Id: I8f25d7a5e47890a0496af023149717e1df482f98
2023-08-18Merge cherrypicks of ['googleplex-android-review.googlesource.com/24432330', ↵android-platform-11.0.0_r35Android Build Coastguard Worker
'googleplex-android-review.googlesource.com/24470825'] into rvc-platform-release. Change-Id: I1b1058dccb18618795c14c01477170f2e3b3b8c4
2023-08-18Disallow loading icon from content URI to PipMenuHongwei Wang
Bug: 278246904 Test: manually, with the PoC app attached to the bug (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5f5a87d8a0dc9190327ba0e6113d5b80ee96abae) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:cc9082a353dc4d9d3c0f11ee5778d4f50f899e0a) Merged-In: Iecfc1fb962de611cbe3c51a44ba4fded53925a7d Change-Id: Iecfc1fb962de611cbe3c51a44ba4fded53925a7d
2023-08-18Add placeholder when media control title is blankBeth Thibodeau
When an app posts a media control with no available title, show a placeholder string with the app name instead Bug: 274775190 Test: atest MediaDataManagerTest (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:070eff919c85fd83501e380a92e30caf082e9ffc) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:32f6722640be1f8a724cdef5aa3b0e04118c45b0) Merged-In: Ie406c180af48653595e8e222a15b4dda27de2e0e Change-Id: Ie406c180af48653595e8e222a15b4dda27de2e0e
2023-08-11Merge cherrypicks of ['googleplex-android-review.googlesource.com/21027348', ↵Android Build Coastguard Worker
'googleplex-android-review.googlesource.com/23769826', 'googleplex-android-review.googlesource.com/23892526', 'googleplex-android-review.googlesource.com/23877020', 'googleplex-android-review.googlesource.com/23792288', 'googleplex-android-review.googlesource.com/23985766', 'googleplex-android-review.googlesource.com/23835332', 'googleplex-android-review.googlesource.com/24029386', 'googleplex-android-review.googlesource.com/24057913', 'googleplex-android-review.googlesource.com/24294454', 'googleplex-android-review.googlesource.com/24301360', 'googleplex-android-review.googlesource.com/24271007'] into rvc-platform-release. Change-Id: I63690ab321eda5781bef93be22b8d42b6c9f25f6
2023-08-11[RESTRICT AUTOMERGE] Ignore small source rect hintHongwei Wang
Which may be abused by malicious app to create a non-visible PiP window that bypasses the background restriction. Bug: 270368476 Test: Manually, using the POC app (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a54d763886ffd69aa14360dc999c76cd2af263f2) Merged-In: Ifc0e4ffe8b7a9754053246069cb480aa6a59a7e1 Change-Id: Ifc0e4ffe8b7a9754053246069cb480aa6a59a7e1
2023-08-11RESTRICT AUTOMERGE: SettingsProvider: exclude secure_frp_mode from resetsEric Biggers
When RescueParty detects that a system process is crashing frequently, it tries to recover in various ways, such as by resetting all settings. Unfortunately, this included resetting the secure_frp_mode setting, which is the means by which the system keeps track of whether the Factory Reset Protection (FRP) challenge has been passed yet. With this setting reset, some FRP restrictions went away and it became possible to bypass FRP by setting a new lockscreen credential. Fix this by excluding secure_frp_mode from resets. Note: currently this bug isn't reproducible on 'main' due to ag/23727749 disabling much of RescueParty, but that is a temporary change. Bug: 253043065 Test: With ag/23727749 reverted and with my fix to prevent com.android.settings from crashing *not* applied, tried repeatedly setting lockscreen credential while in FRP mode, using the smartlock setup activity launched by intent via adb. Verified that although RescueParty is still triggered after 5 attempts, secure_frp_mode is no longer reset (its value remains "1"). Test: Verified that secure_frp_mode still gets changed from 1 to 0 when FRP is passed legitimately. Test: atest com.android.providers.settings.SettingsProviderTest Test: atest android.provider.SettingsProviderTest (cherry picked from commit 9890dd7f15c091f7d1a09e4fddb9f85d32015955) (changed Global.SECURE_FRP_MODE to Secure.SECURE_FRP_MODE, needed because this setting was moved in U) (removed static keyword from shouldExcludeSettingFromReset(), needed for compatibility with Java 15 and earlier) (resolved conflict in resetSettingsLocked()) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5bd6bb45d70b07243371fbe2f70570e353bb612d) Merged-In: Id95ed43b9cc2208090064392bcd5dc012710af93 Change-Id: Id95ed43b9cc2208090064392bcd5dc012710af93
2023-08-11[conflict] Merge "Add userId check before loading icon in Device Controls" ↵Anton Potapov
into rvc-dev am: 2818ba8c93 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23918603 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:373c5ac49e78467827763bdbf2fa0252d1cd961b) Merged-In: I4666499fa8e2c51a7900913c9e22127cb6a4283a Change-Id: I4666499fa8e2c51a7900913c9e22127cb6a4283a
2023-08-11Fixing DatabaseUtils to detect malformed UTF-16 stringsKunal Malhotra
Test: tested with POC in bug, also using atest Bug: 224771621 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:fb4a72e3943d166088407e61aa4439ac349f3f12) Merged-In: Ide65205b83063801971c5778af3154bcf3f0e530 Change-Id: Ide65205b83063801971c5778af3154bcf3f0e530
2023-08-11Fix KCM key mapping cloningJosep del Rio
ag/23792288 tried to fix a security issue by cloning the key mappings, but unfortunately the parcel was not being rewinded. Bug: 274058082 Test: Confirmed change works in newer Android versions (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:aaaba6cf190d976efdc5db6c78997dbdc9214c15) Merged-In: I6f75b9202e20d82ebf81a35a2916e653ee1b8372 Change-Id: I6f75b9202e20d82ebf81a35a2916e653ee1b8372
2023-08-11Update parcling logic for Uris.Varun Shah
Implicitly convert all Uris to StringUris during parcel read/write. Bug: 231476072 Test: atest UriTest (cherry picked from commit 98bc5f99b14239aa871a998548ad80a076756318) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:18a2f95baeabdf23ecdb0475e62b8395825a26f6) Merged-In: Ic7688a00a07705301e5b06ee8783e801395e9f15 Change-Id: Ic7688a00a07705301e5b06ee8783e801395e9f15
2023-08-11[DO NOT MERGE] Verify URI Permissions in Autofill RemoteViewsTim Yu
Check permissions of URI inside of FillResponse's RemoteViews. If the current user does not have the required permissions to view the URI, the RemoteView is dropped from displaying. This fixes a security spill in which a user can view content of another user through a malicious Autofill provider. Bug: 283137865 Fixes: b/283264674 b/281666022 b/281665050 b/281848557 b/281533566 b/281534749 b/283101289 Test: Verified by POC app attached in bugs Test: atest CtsAutoFillServiceTestCases (added new tests) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5c72cd48097f7cdaa62e9eb1a0aeddbb941ec981) Merged-In: I6f4d2a35e89bbed7bd9e07bf5cd3e2d68b20af9a Change-Id: I6f4d2a35e89bbed7bd9e07bf5cd3e2d68b20af9a
2023-08-11Do not share key mappings with JNI objectJosep del Rio
The key mapping information between the native key mappings and the KeyCharacterMap object available in Java is currently shared, which means that a read can be attempted while it's being modified. Because the code changed between R and S, this CL fixes it just for R; the patch for versions S+ is ag/23785419 Bug: 274058082 Test: Presubmit (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4b3c4620166071561ec44961fb08a56676b4fd6c) Merged-In: I3be94534dcda365da473f82347ae2e3f57bb1b42 Change-Id: I3be94534dcda365da473f82347ae2e3f57bb1b42
2023-08-11Verify URI permissions for EXTRA_REMOTE_INPUT_HISTORY_ITEMS.Ioana Alexandru
Also added a step to serialize & deserialize the notification in the test, to prevent exceptions about not being able to cast e.g. Parcelable[] to RemoteInputHistoryItem[]. Test: atest NotificationManagerServiceTest & tested with POC from bug Bug: 276729064 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:88e597d2b31d054ab5286b3a666accb08a8db5d5) Merged-In: I7053ca59f9c7f1df5226418594109cfb8b609b1e Change-Id: I7053ca59f9c7f1df5226418594109cfb8b609b1e
2023-08-11DO NOT MERGE Revert "Verify URI permissions for ↵Ioana Alexandru
EXTRA_REMOTE_INPUT_HISTORY_ITEMS." This reverts commit 43b1711332763788c7abf05c3baa931296c45bbb. Reason for revert: regression reported at b/289223315 Bug: 289223315 Bug: 276729064 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f9d8830e3264c66d0f39b1d45eadd4039695a112) Merged-In: I101938fbc51592537023345ba1e642827510981b Change-Id: I101938fbc51592537023345ba1e642827510981b
2023-08-11Import translations. DO NOT MERGE ANYWHEREBill Yi
BUG:286996125 Auto-generated-cl: translation import (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:917729f52b84d8ff1140ece2dd696914426adcd3) Merged-In: I9f1045f17a003528a57cb8e9dfc53e5df40579f3 Change-Id: I9f1045f17a003528a57cb8e9dfc53e5df40579f3