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

Commit 9d39648d authored by Adam Powell's avatar Adam Powell Committed by Gerrit Code Review
Browse files

Merge "Restore auto-launch behavior for ACTION_CHOOSER with a single choice"

parents 5a3ac105 2f6ec22f
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -280,24 +280,6 @@ public class ChooserActivity extends ResolverActivity {
        return true;
    }

    @Override
    boolean shouldAutoLaunchSingleChoice(TargetInfo target) {
        final Intent intent = target.getResolvedIntent();
        final ResolveInfo resolve = target.getResolveInfo();

        // When GET_CONTENT is handled by the DocumentsUI system component,
        // we're okay automatically launching it, since it offers it's own
        // intent disambiguation UI.
        if (intent != null && Intent.ACTION_GET_CONTENT.equals(intent.getAction())
                && resolve != null && resolve.priority > 0
                && resolve.activityInfo != null && DocumentsContract.PACKAGE_DOCUMENTS_UI
                        .equals(resolve.activityInfo.packageName)) {
            return true;
        }

        return false;
    }

    private void modifyTargetIntent(Intent in) {
        final String action = in.getAction();
        if (Intent.ACTION_SEND.equals(action) ||