Merge "Implement general play intent." into pi-dev
diff --git a/car-media-common/src/com/android/car/media/common/MediaSource.java b/car-media-common/src/com/android/car/media/common/MediaSource.java
index 78bbd64..fe393e7 100644
--- a/car-media-common/src/com/android/car/media/common/MediaSource.java
+++ b/car-media-common/src/com/android/car/media/common/MediaSource.java
@@ -92,9 +92,6 @@
      * Custom media sources which should not be templatized.
      */
     private static final Set<String> CUSTOM_MEDIA_SOURCES = new HashSet<>();
-    static {
-        CUSTOM_MEDIA_SOURCES.add("com.android.car.radio");
-    }
 
     /**
      * An observer of this media source.
diff --git a/car-media-common/src/com/android/car/media/common/PlaybackModel.java b/car-media-common/src/com/android/car/media/common/PlaybackModel.java
index c472911..6206afe 100644
--- a/car-media-common/src/com/android/car/media/common/PlaybackModel.java
+++ b/car-media-common/src/com/android/car/media/common/PlaybackModel.java
@@ -320,6 +320,15 @@
     }
 
     /**
+     * Prepares the current media source for playback.
+     */
+    public void onPrepare() {
+        if (mMediaController != null) {
+            mMediaController.getTransportControls().prepare();
+        }
+    }
+
+    /**
      * Possible main actions.
      */
     @IntDef({ACTION_PLAY, ACTION_STOP, ACTION_PAUSE, ACTION_DISABLED})