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

Commit 920abc0a authored by Matt Casey's avatar Matt Casey Committed by Abhishek Aggarwal
Browse files

Copy multi-image editor fix to QPR

Already fixed in master via https://android-review.googlesource.com/c/platform/frameworks/base/+/2049443

This is that change, but in QPR.

Test: Share multiple images from photos, verify that edit button doesn't
      appear.
Bug: 247638926
Merged-In: Id6ce93efacd54a86d870595ae32b4e6efcec0c04
Change-Id: I51b7d332b6b7e59ee559716022d795bb8de4a71c
parent 003f902a
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
@@ -1179,6 +1179,19 @@ public class ChooserActivity extends ResolverActivity implements
        final Intent resolveIntent = new Intent(originalIntent);
        final Intent resolveIntent = new Intent(originalIntent);
        resolveIntent.setComponent(cn);
        resolveIntent.setComponent(cn);
        resolveIntent.setAction(Intent.ACTION_EDIT);
        resolveIntent.setAction(Intent.ACTION_EDIT);
        String originalAction = originalIntent.getAction();
        if (Intent.ACTION_SEND.equals(originalAction)) {
            if (resolveIntent.getData() == null) {
                Uri uri = resolveIntent.getParcelableExtra(Intent.EXTRA_STREAM);
                if (uri != null) {
                    String mimeType = getContentResolver().getType(uri);
                    resolveIntent.setDataAndType(uri, mimeType);
                }
            }
        } else {
            Log.e(TAG, originalAction + " is not supported.");
            return null;
        }
        final ResolveInfo ri = getPackageManager().resolveActivity(
        final ResolveInfo ri = getPackageManager().resolveActivity(
                resolveIntent, PackageManager.GET_META_DATA);
                resolveIntent, PackageManager.GET_META_DATA);
        if (ri == null || ri.activityInfo == null) {
        if (ri == null || ri.activityInfo == null) {