Support entering PiP from live tile
When finish the recents animation, send user leave hint if live tile is
currently on. Note that we force the PiP window fades in in this case.
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/bLoRpbgcyZBt1UiQPZEXcF
Bug: 187421300
Test: manual, see video
Change-Id: I07bc307c5eb895cd23b764af92e39ff7e6f8e805
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index a04b886..5958832 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -3359,6 +3359,13 @@
return;
}
+ final boolean sendUserLeaveHint = toRecents && LIVE_TILE.get();
+ if (sendUserLeaveHint) {
+ // Notify the SysUI to use fade-in animation when entering PiP from live tile.
+ final SystemUiProxy systemUiProxy = SystemUiProxy.INSTANCE.get(getContext());
+ systemUiProxy.notifySwipeToHomeFinished();
+ systemUiProxy.setShelfHeight(true, mActivity.getDeviceProfile().hotseatBarSizePx);
+ }
mRecentsAnimationController.finish(toRecents, () -> {
if (onFinishComplete != null) {
onFinishComplete.run();
@@ -3370,7 +3377,7 @@
// taps on QSB (3) user goes back to Overview and launch the most recent task.
setCurrentTask(-1);
mRecentsAnimationController = null;
- });
+ }, sendUserLeaveHint);
}
public void setDisallowScrollToClearAll(boolean disallowScrollToClearAll) {