MediaPlaylistAgent is the abstract class an application needs to
derive from to pass an object to a MediaSession2 that will override
default playlist handling behaviors. It contains a set of notify*
methods to signal MediaSession2 that playlist-related state has
changed.
Bug: 64098437
Test: make update-api
Change-Id: Icb3c57ddc14eba276f49d4ba85f11adbeb3e0917
Added callback for session to know the currently playing media item has
changed.
Note that the callback is called in response to the
MediaPlayerBase#PlayerEventCallback#onCurrentDataSourceChanged(mpb, dsd
is called. Session will translate dsd to the media item and calls
onCurrentMediaItemChanged().
Following changes are also included
- Removed MediaPlaylistController#getCurrentPlaylistItem(),
because currently playing item is managed by the MediaPlayerBase.
- Renamed ControllerCallback#onCurrentPlaylistItemChanged() to the
ControllerCallback#onCurrentMediaItemChanged(), to make it more
obvious that the event is from MediaPlayerBase, not
MediaPlaylistController.
- Added SessionCallback#onCurrentMediaItemChanged()
Bug: 64098437
Test: Run MediaComponents test
Change-Id: I78b124a7da0f968b097b2576507b9a73e36081ec
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
Player can be updated meantime, and player event from the previous
player can be sent after the update. Providing player information will
provide developers more opportunity to filter out unecessary callbacks.
Bug: 64098437
Test: Run MediaComponents test
Change-Id: I9c23101df139e26351c008462c726ae7069130eb
Getting the content provider could
return null in some cases where the user
is locked, so check for that when closing.
Bug: 73656609
Test: no crash
Change-Id: I607cd2da5348520616a1c171d0d8a1afacabe592
This CL includes following changes
- Remove outdated TODOs
- Added buganizer issue if the remaining work take more than 5m
Test: Run MediaComponents tests
Change-Id: I8968e12aabcbc67f69dbf14485b3716d0e95779b
This is to follow MediaPlayer2 and MediaPlayerBase's API style.
Bug: 64098437
Test: make update-api
Change-Id: I7fe17852d16237fac801c716eab1007cd0337867
This would be used in response to
- MediaController2#play()
- KEYCODE_MEDIA_STOP
Bug: 64098437
Test: passed MediaComponentTest
Change-Id: I7cd4d855d5e1bf8e4260a9b920f30dfe2eea44e1
This CL makes the Javadoc of METADATA_KEY_* to be consistent.
Bug: 73877547
Test: Builds successfully
Change-Id: Icb68d62230bb4e523da2015db76d5aeaa098c69a
System API for a registered AudioPolicy to attach or detach
AudioMix without having to unregister, and then registering
the new mix configuration.
Bug: 63906162
Test: AudioPolicyTest
Change-Id: Ib2fea8aa034d3f7b498e76dc1fc51c1ea508d3a2
API review suggested that default security level
be mentioned in the older openSession method as
well as in the new one.
bug:73750379
Change-Id: I0c740fe4c9579cb8cd7ab623e940193ad34dfd16
This mirror the corresponding NDK API. For some
reason this was missing from the java version
of Image.
Bug: 73784759
Test: manual
Change-Id: Iafa6dedda809fe38ea4453d9873d1ba886f88481
Remove cas header from media jni headers, and define flags
for PES header extraction.
bug: 73898003
test: CTS MediaCasTest, MediaDrmClearkeyTest
Change-Id: I2a512e2dbeb8be53a64bfa0b89254032c7341fa2
This CL also removes the public constructor of MediaItem2, which was
suggested by API reviewers.
Bug: 73971203
Test: Passed MediaBrowser2Test (CTS)
Change-Id: If82c2795a4f205b9dfd4db11a173433359d1b352
The Javadoc of the METADATA_KEY_* does not contain type information.
This CL adds '@see' in each key so that the developer can easily notice
what method should be used.
Bug: 73877547
Test: Builds successfully
Change-Id: I04f1b0badc1b6e7af6cb04923ef4f59328248b74
Define as an abstract class the high level interface for
media players. Consumers are MediaSession2, providers
are MediaPlayer2, which will extend this class.
Bug: 64098437
Test: to be in MediaPlayer2 tests once it extends MPB
Change-Id: Id0d0fcb6d1b377a0e05a4a8e3d659e12a58fc45e