OSDN Git Service

Make PiP window visible when user launches PiP in landscape mode
authorTracy Zhou <tracyzhou@google.com>
Tue, 4 Jun 2019 23:05:19 +0000 (16:05 -0700)
committerTracy Zhou <tracyzhou@google.com>
Fri, 7 Jun 2019 18:10:02 +0000 (11:10 -0700)
commit316b1f5028faa4a5775249d23f163269d15b3afc
treec9d615ffce33236c82c72988c5786eb71515735b
parent1f66726d08505dca06e8c60add14de5d510a934f
Make PiP window visible when user launches PiP in landscape mode

Two PiP animations are triggered when launching PiP in landscape mode
(one when first swiping up (FADE_IN), the other moves the PiP window to
portrait position (BOUNDS)). When screen rotation happens after the first
animation is started, it cancels it while leaving the window alpha to
close to 0. In order to make sure the window after rotation has the correct
alpha, we should set the alpha of the window when mCancelCurrentBoundsAnimation is true to 1.

Fixes: 133711307
Test: Play a YouTube video in landscape mode, and then swipe up. Make
sure that PiP window shows up after screen rotation forced by launcher
Test: atest PinnedStackTests
Change-Id: I3ec186b0e1e3f50dc91cfb03fc3847ddd7b5faef
services/core/java/com/android/server/wm/TaskStack.java