Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d34ae40f authored by Nan Wu's avatar Nan Wu
Browse files

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
parent b2d5ed95
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment