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 Change-Id: Ia8c6123e8e9325d17d2bfab9589b11eb087da97a
Loading
Please register or sign in to comment