| commit | 8cbc793b0d0cf085e722271bc522bc048885566d | [log] [tgz] |
|---|---|---|
| author | Nan Wu <wnan@google.com> | Mon Jun 03 19:12:22 2024 +0000 |
| committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Oct 10 14:12:38 2025 -0700 |
| tree | 9df199a019d0379d31c09a6a053d18811740488c | |
| parent | 731cf3f25c7e7c1fa587bb35fdcedba712883b4c [diff] |
RESTRICT AUTOMERGE Allow an activity to start a new task via startNextMatchingActivity A vulnerability bug fix (b/230492947) causes this no longer works. We cannot simply fix the issue by trying to avoid move the task to the front. The real reason is that startNextMatchingActivity uses launchedFromUid (the app the lauches the orignal activity) to as the callingUid and realCallingUid to launch the next matching activity - though setting callingUid is largely irrelevant because ActivityStarter sets it to caller app's uid if the caller is set; In this case, the caller is set to the app that calls the method. But for BAL purpose, this is not good because the launched from app might have privileges, such as the Launcher app. Change the realCallingUid to the activity that calls startNextMatchingActivity. Bug: 337726734 Test: Manual test. BackgroundActivityLaunchTest#testBackgroundActivityBlockedInStartNextMatchingActivity Flag: EXEMPT Bug Fix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d34ae40f870d4362a069940a035a4d58a536a231) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:cd9e02bd1cec948fbda7ef22745d57df5e56dc2c) Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:d55fc71f0bcda732e4adc9142c858eef30e22615 Merged-In: Ia8c6123e8e9325d17d2bfab9589b11eb087da97a Change-Id: Ia8c6123e8e9325d17d2bfab9589b11eb087da97a