Fix live tile regression in quick switch mode

We registered a hook to call updateFinalShift() when recents view has scroll change to support scrolling recents side to side during swipe up from an app (ag/5514447). This breaks the current flow of quick switch in live tile mode where we close the LauncherLayoutListener upon quickswitch transition is finished. (Since updateFinalShift is called, we reopen LauncherLayoutListener.)

Further, live tile previously had an assumption that live tile can only go off screen on the right. Because getGlobalVisibleRect() has the limitation of only getting coordinates on the screen, our calculation to fill the missing offscreen part to transform app window does not work for the case when live tile is going off screen on the left (e.g. quick switch).

Fixes: 123915937
Test: Turn off quick switch and scrub from an app. Verify that live tile rendering is correct.

Change-Id: I5fa7e38b80309f083227240c24847f88a2c1cc28
3 files changed