Revert "Deprecate EXTRA_STREAM."

This reverts commit a0ba51c2ab75c8e0406bbd43742597552b6dae98.

Bug: 35293781
Change-Id: I5f0b9000535ac0bcbbe125fe781c20c5fb0c8782
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 81aea8d..b03ba1b 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -16,8 +16,6 @@
 
 package android.content;
 
-import static android.content.ContentProvider.maybeAddUserId;
-
 import android.annotation.AnyRes;
 import android.annotation.BroadcastBehavior;
 import android.annotation.IntDef;
@@ -43,6 +41,7 @@
 import android.os.ShellCommand;
 import android.os.StrictMode;
 import android.os.UserHandle;
+import android.os.storage.StorageManager;
 import android.provider.DocumentsContract;
 import android.provider.DocumentsProvider;
 import android.provider.MediaStore;
@@ -50,9 +49,7 @@
 import android.util.ArraySet;
 import android.util.AttributeSet;
 import android.util.Log;
-
 import com.android.internal.util.XmlUtils;
-
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 import org.xmlpull.v1.XmlSerializer;
@@ -70,6 +67,8 @@
 import java.util.Objects;
 import java.util.Set;
 
+import static android.content.ContentProvider.maybeAddUserId;
+
 /**
  * An intent is an abstract description of an operation to be performed.  It
  * can be used with {@link Context#startActivity(Intent) startActivity} to
@@ -3872,23 +3871,9 @@
     public static final String EXTRA_HTML_TEXT = "android.intent.extra.HTML_TEXT";
 
     /**
-     * A content: URI holding a stream of data associated with the Intent, used
-     * with {@link #ACTION_SEND} to supply the data being sent.
-     * <p>
-     * Starting in {@link android.os.Build.VERSION_CODES#JELLY_BEAN} this value
-     * will be automatically promoted to {@link Intent#setClipData(ClipData)}
-     * when that value is not already defined.
-     * <p>
-     * Starting in {@link android.os.Build.VERSION_CODES#O} this value will be
-     * automatically demoted from {@link Intent#getClipData()} when this value
-     * is not already defined.
-     *
-     * @deprecated apps should use {@link Intent#setClipData(ClipData)} and
-     *             {@link Intent#getClipData()} instead of this extra, since
-     *             only those APIs can extend temporary permission grants to the
-     *             underlying resource.
+     * A content: URI holding a stream of data associated with the Intent,
+     * used with {@link #ACTION_SEND} to supply the data being sent.
      */
-    @Deprecated
     public static final String EXTRA_STREAM = "android.intent.extra.STREAM";
 
     /**
@@ -9433,21 +9418,6 @@
                 mContentUserHint = UserHandle.USER_CURRENT;
             }
         }
-
-        // If someone is sending us ClipData, but not EXTRA_STREAM, offer to
-        // downgrade that content for older apps to find
-        if (mClipData != null && mClipData.getItemCount() > 0 && !hasExtra(EXTRA_STREAM)) {
-            final String action = getAction();
-            if (ACTION_SEND.equals(action)) {
-                putExtra(EXTRA_STREAM, mClipData.getItemAt(0).getUri());
-            } else if (ACTION_SEND_MULTIPLE.equals(action)) {
-                final ArrayList<Uri> list = new ArrayList<>();
-                for (int i = 0; i < mClipData.getItemCount(); i++) {
-                    list.add(mClipData.getItemAt(i).getUri());
-                }
-                putExtra(EXTRA_STREAM, list);
-            }
-        }
     }
 
     /**