diff --git a/src/com/android/documentsui/picker/PickActivity.java b/src/com/android/documentsui/picker/PickActivity.java index 4f875072e65a6ded8a390d52c3925eb996995401..016f07199c30facaf1e262ad011a1c6a7df97b0e 100644 --- a/src/com/android/documentsui/picker/PickActivity.java +++ b/src/com/android/documentsui/picker/PickActivity.java @@ -236,6 +236,8 @@ public class PickActivity extends BaseActivity implements ActionHandler.Addons { final Intent moreApps = new Intent(intent); moreApps.setComponent(null); moreApps.setPackage(null); + // Clear the selector to prevent a malicious selector from launching an arbitrary activity. + moreApps.setSelector(null); if (mState.supportsCrossProfile) { if (mConfigStore.isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastS()) { mState.canForwardToProfileIdMap = mUserManagerState.getCanForwardToProfileIdMap(