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
- Added logic for streams to be muted by dnd (unassociated with ringer)
Test: runtest -x frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
Bug: 73362490
Change-Id: I1101e67282f7331497e91eb510d2bf4f1ea6b4b1
Now requires permission if targeting P.
Note that this is a separate permission from the existing one
that is required for instant apps to use foreground services. The
reason for this is that their semantics are different (the instant
apps permission is associated with an app op for control over what
the app is allowed, while the regular app permission is just a
normal permission that is always granted and only there for
auditing of apps), and there are probably going to be cases where
a developer will want to use a foreground service in the full
version of their app but not as an instant app.
Bug: 72116995
Test: atest CtsAppTestCases
Change-Id: I883c9515c307ed8e39f0bf888c4045944c8183ac
Bug: 73953797
Test: unit test
Change-Id: Id89c9100e8963a3cb890ebec347e4aabcd5fd4b8
(cherry picked from commit 4281d0ff57)
Merged-in: Id89c9100e8963a3cb890ebec347e4aabcd5fd4b8
This reverts commit e77386e8fb [1].
Reason for revert:
The protocol is not yet ready to be exposed and we are still unsure
what is the best approach.
[1]: Ie86edafd1ed68b58f702116f561fc448fdbb57a8
Bug: 7031513
Bug: 72522601
Fix: 74087970
Test: atest CtsInputMethodTestCases
Change-Id: Ia61dc9b3d5b116199382994430fb16ee804942b3
Bug: 73529437
Test: I60fbee6d3610070413e8c46f363ec3c19c2e7c52
Allow setting AnimatedImageDrawable's loop count in xml. Use
"repeatCount" to match the existing attr used by other objects, and
change the Java api from "loop" to "repeat".
Cache the repeat count in the State object for the situation where we
inflate but are waiting on a theme, so that when we get a src we can
apply the existing repeat count.
Change-Id: Ie723fe9a40c64dd0e1e8fd7b5d5cf81e5c5ccd0d
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
These CarrierConfig values are needed for a
CC app to override the SPN dynamically. Since
Carrier names are very complicated, it's extra
important that these values be exposed so that we
can properly enforce correct behavior through CTS.
Bug: 73734601
Test: compilation (no functional change)
Change-Id: I26dab1bd32d1d5273f707a37026cffca7fd639a3
Want to be able to support allowing a Slice to specify some keywords
associated with it; need a new hint to identify these.
Bug: 74086214
Test: make
Change-Id: I79d3f1806eecf416f5e3ae09451b90507b382c24