Merge "Remove Intent selector from 2-pane deep link Intent"

This commit is contained in:
Arc Wang
2022-11-02 12:13:36 +00:00
committed by Android (Google) Code Review
2 changed files with 31 additions and 0 deletions

View File

@@ -397,6 +397,10 @@ public class SettingsActivity extends SettingsBaseActivity
*/
public static Intent getTrampolineIntent(Intent intent, String highlightMenuKey) {
final Intent detailIntent = new Intent(intent);
// Guard against the arbitrary Intent injection.
if (detailIntent.getSelector() != null) {
detailIntent.setSelector(null);
}
// It's a deep link intent, SettingsHomepageActivity will set SplitPairRule and start it.
final Intent trampolineIntent = new Intent(ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY)
.setPackage(Utils.SETTINGS_PACKAGE_NAME)