Fix tv edu text drawer not closing completely
The edu text drawer closes by doing a slide animation - it looks like it slides behind the pip content (even thought it is actually drawn on top of the pip surface). We do the slide animation by having a ValueAnimator animate from the current height of the drawer to 0. On each animation update, we update the LayoutParams.height of the TvPipEduTextDrawer until eventually the height converges to 0 and at that point the edu text drawer is gone. The pip menu surface size is updated on each frame of the animation. To determine the necesary size for the pip menu surface, the TvPipMenuController asks the TvPipMenuView to calculate that, taking into account the current height of the edu text drawer. It does so by using the View.getHeight() method. However, even though we set LayoutParams.height to 0, the height of the edu text drawer remains 1, which causes the pip menu surface to stay 1px bigger in height than desired. In this CL, we mitigate that by making the edu text GONE at the end of the animation and returning 0 for the edu drawer height. This also ensures a safe recovery in error states by making the final size of the pip menu surface correct. Bug: 275693800 Test: m SystemUI && verify white pip focus border touches the pip content without any grey line below the pip content Change-Id: I4f3aec560ca7e2170e163852ce741fec349dfae4
Loading
Please register or sign in to comment