commit | a141de4fe431c74091f5d62bf61d8a0a4d984e2f | [log] [tgz] |
---|---|---|
author | Tomasz Wasilczyk <[email protected]> | Thu May 24 22:24:42 2018 +0000 |
committer | Android (Google) Code Review <[email protected]> | Thu May 24 22:24:42 2018 +0000 |
tree | fffbb7d441943c02a1637ad8821446a65f74b720 | |
parent | 47879540483bdcf58164346db3b2194cb7899515 [diff] | |
parent | a96adc674e4c5b31a941e7e6860d3c1ec3425c32 [diff] |
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})