OSDN Git Service

MediaSession2: Add onDataSourceMissingHelper
authorJaewan Kim <jaewan@google.com>
Tue, 6 Mar 2018 05:43:10 +0000 (14:43 +0900)
committerSungsoo Lim <sungsoo@google.com>
Wed, 7 Mar 2018 07:31:53 +0000 (16:31 +0900)
commit4d4a8c95ae9cb49413aa13ec19dcef5068ea710f
treed25246c05279dced2a9988f514721671c15db5ff
parent8c76ca03418884d8e60bda1f5695d44563b20007
MediaSession2: Add onDataSourceMissingHelper

This allows a developer to create DataSourceDesc when the item is about
to be played. Typical example of the usages are,

    1. For a playlist consists of FileDescriptors, its developer may not
        want to open all files when MediaSession2.setPlaylist() is
        called.
    2. A controller has called setPlaylist(), addPlaylistItem(), or
        replacePlaylistItem(). Controller cannot know the
        DataSourceDesc, and only the session developer can know about
        it.

Bug: 64098437
Test: Run MediaComponents test
Change-Id: I73f27ca0a799b1cddf5046b41f0ca01d08037103
api/current.txt
media/java/android/media/MediaItem2.java
media/java/android/media/MediaSession2.java