This fixes crash when framework tries to connect to the library session
impl when the session's super constructor is finished but mCallback
isn't set yet.
Bug: 73327626
Test: Run all MediaComponents test once
Change-Id: I42776925fc45b907072c39bc6dbc0dc86a896e0f
This commit disables "MediaComponents" in PDK builds because
"MediaComponents" depends on classes from "frameworks/base/core/java"
which are not in PDK builds as well.
Test: Build a target (described in http://b/72961456) with
`platform.zip` built from master FSK source tree.
Bug: 72961456
Change-Id: I79ff96b84d8d7865c83b186490f7587d2a89fbdc
There's a bug in SessionToken2 constructor that session service is
misunderstood as library service. It's because
PackageManager.resolveService(Intent, int) ignores action in the intent
if the class name is specified, and there's no way for getting the
action from the ResolvedInfo.
Use PackageManager.queryIntentServices(Intent, int) instead to query
services with the action.
Also added tests and fixed ID mismatch issue in test service.
Test: Run all MediaComponents tests once
Change-Id: I5df2f36eae8100be268629881122f47e44eb41d1
This is the preliminary step towards adding tests for library service.
Test: Run all MediaComponents tests once
Change-Id: I42a812f3771f1b15195693189dd83fed590c77ae
The script had searched the apk under the ${OUT}, but it sometimes match
with the invalid apk under ${OUT}/obj/PACKAGING.
Limits the search directory to ${OUT}/system and ${OUT}/data to exclude
obj directory.
Test: Run all MediaComponents tests once
Change-Id: I733b381cbc8e56b5c28515bc93931ce1e5d67e40
Added two functions for MediaSession2Stub not to check if its used by
LibrarySession or Session.
- MediaLibrarySessionImpl.getCallback()
- MediaSession2Stub.getLibrarySession()
Test: Run all MediaComponents tests once
Change-Id: Ie88e1b3d8fc2aa6f2a84db1812de989e23ac8ed3
There had been a bug that only the MediaBrowser2 can receive the change
in the custom layout.
This CL fixes the issue by moving code related with getting custom
layout change from MediaBrowser2Impl to the MediaController2Impl.
Related tests are also added.
Test: Run all MediaComponent tests once
Change-Id: If5ce1be19057af306f46f1b1ab64f18e3f3fb7bd
This CL does the following
1. Fix progress bar not updating issue by
a) Removing mCurrentVisibility variable.
b) posting progress update Runnable when playback state is
changed.
2. Add support for hiding MediaControlView2 instance with both
View.INVISIBLE and View.GONE inside #onVisibilityAggregated.
Bug: 73096369
Test: manually run VideoViewTest.apk
Change-Id: I9c2569e824e85c7bdd809dd4a459cf35ae1aeaa6
It had been in the MediaController2Impl, but it doesn't make sense
because the MediaSession2CallbackStub also handles browser specific
commands.
Test: Run all MediaComponent tests once
Change-Id: I8e8e64c020abbcf87bde3af9db56e601f2a01bb4
This will be repaced once it is integrated with MediaSesssion2 though.
It detects subtitle track and informs to MCV2 to via MediaSession event
so that MCV2 enable CC button.
TimedText related code is added for debugging purpose. It will be
removed later.
Test: VideoViewTest app
Change-Id: I3a8fef04b3cb4875f091f0b72d3a084bf5fa94ac
It should be inner interface of MediaController2Provider because
PlaybackInfo is inner class of MediaController2
Test: Build
Change-Id: Ib809d669c87c2a3b515f4b4824ef3c9da568a037
MediaControlView2's setTimeout API is removed and MCV2's visibility
handling logic is moved into VideoView2.
Test: build
Change-Id: If321f2c040a8d7effaceb917a9109b8b91430520
This stops calling
MediaController2.ControllerCallback.onPlaybackStateChanged() when the
controller is connected.
This is the preliminary step towards sending session's current values
to a controller when it's connected.
Bug: 72547163
Test: Run all tests once
Change-Id: I73b45268dba4ac1fe3fce99a575748db15f19168
- Renames showSubtitle to setSubtitleEnabled
- Introduces isSubtitleEnabled method
- Not to call MediaPlayer's getDuration in invalid states
Test: build
Change-Id: I09c94211dd03002c3a7d50665dd7568ce9083c8f
This CL implements MediaController2.setVolumeTo/adjustVolume for the
case when a volume provider is set.
Bug: 72788940
Test: Passed MediaController2Test
Change-Id: Ia87ca5dfb0957930849ac647b54470b8e9a3d220
This CL makes controller's onPlaybackInfoChanged() be called whenever
the session calls setPlayer().
Also, it replaces all usages of VolumeProvider with VolumeProvider2.
Bug: 72616099
Test: Passed MediaSession2Test
Change-Id: I51f48f49e8d2ee369571de0ef48353750a0612be