History log of /frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/VideoSurfaceView.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
01f4dd4a9bc3b80d3ddecc0264facbf6abfc1cc3 07-Feb-2017 Dake Gu <dake@google.com> DetailsFragment: coordinate transition and PlaybackGlue

1. Exclude SurfaceView from transition because
it's quite a big hit on performance and unknown consequence
if we force the color format to be RGBA8888.
Disabled setTransitionVisibility() which causes
visual flickering even view is not running
transition. We will see the SurfaceView disappears
immediately after activity return transition is finished.

2. DetailsFragment will postpone setHost on PlaybackGlue until
all three conditions satisfied:
- onStart() is called
- activity enter transition is finished
- entrance transition is finished
It is tricky to query if enter transition will run. We did
this by checking if there is enter transition started after
200ms of data loading.

3. When DetailsFragment execute return transition:
- call DetailsBackgroundVideoHelper.disableParallax()
to avoid auto-play video when detailsFrame is
running a slide transition to bottom.
- if video is not playing: immediately remove VideoFragment
so we wont see a dark SurfaceView during return transition.
- if video is playing: Let the Video continue playing when
running return transition. (Because it's much better to
pops out VideoFragment at end than in the middle of running
transition).

4. removed 1 sec CROSSFADE_DELAY between play() and fade out
background drawable, this seems unnecessary after we have
the onPlaybackReady() callback.

Bug: 32987665
Test: leanback tests (and there is no way to test activity transition
in ActivityTestRule)

Change-Id: I2ecee0276aa6ffc7963b92cd2104bb1ca62b01cd
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/VideoSurfaceView.java