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

Commit 19eaf0a7 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Catch CCE when migrating to ClipData." into jb-dev

parents f3afe157 dd471e6a
Loading
Loading
Loading
Loading
+40 −42
Original line number Diff line number Diff line
@@ -6588,11 +6588,8 @@ public class Intent implements Parcelable, Cloneable {

        final String action = getAction();
        if (ACTION_SEND.equals(action)) {
            Uri stream = null;
            try {
                stream = getParcelableExtra(EXTRA_STREAM);
            } catch (ClassCastException e) {
            }
                final Uri stream = getParcelableExtra(EXTRA_STREAM);
                final CharSequence text = getCharSequenceExtra(EXTRA_TEXT);
                final String htmlText = getStringExtra(EXTRA_HTML_TEXT);
                if (stream != null || text != null || htmlText != null) {
@@ -6602,13 +6599,12 @@ public class Intent implements Parcelable, Cloneable {
                    setClipData(clipData);
                    addFlags(FLAG_GRANT_READ_URI_PERMISSION);
                }
            } catch (ClassCastException e) {
            }

        } else if (ACTION_SEND_MULTIPLE.equals(action)) {
            ArrayList<Uri> streams = null;
            try {
                streams = getParcelableArrayListExtra(EXTRA_STREAM);
            } catch (ClassCastException e) {
            }
                final ArrayList<Uri> streams = getParcelableArrayListExtra(EXTRA_STREAM);
                final ArrayList<CharSequence> texts = getCharSequenceArrayListExtra(EXTRA_TEXT);
                final ArrayList<String> htmlTexts = getStringArrayListExtra(EXTRA_HTML_TEXT);
                int num = -1;
@@ -6641,6 +6637,8 @@ public class Intent implements Parcelable, Cloneable {
                    setClipData(clipData);
                    addFlags(FLAG_GRANT_READ_URI_PERMISSION);
                }
            } catch (ClassCastException e) {
            }
        }
    }