Improve PIP enter transition w/ gesture nav (3/N)
Directly transition Activity to PiP mode in launcher if the Activity claims auto-pip support. Video is taken by commenting out the requirement of setting the auto-pip flag. Note that we need app to actively push up-to-dated PictureInPictureParams to the framework, otherwise we won't be get - PictureInPictureParams on first entering - Staled PictureInPictureParams if the aspect ratio is changed Video: http://rcll/aaaaaabFQoRHlzixHdtY/abenIxLFI1pZzF2O8t4TbS Bug: 143965596 Test: see demo videos Change-Id: Iea9a6ff39a79431ac1afa14aea812c500b3ca3b2
This commit is contained in:
@@ -18,6 +18,8 @@ package com.android.quickstep;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
|
||||
|
||||
import android.graphics.Rect;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.UiThread;
|
||||
|
||||
@@ -155,6 +157,18 @@ public class RecentsAnimationController {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the final bounds on a Task. This is used by Launcher to notify the system that
|
||||
* animating Activity to PiP has completed and the associated task surface should be updated
|
||||
* accordingly. This should be called before `finish`
|
||||
* @param taskId for which the leash should be updated
|
||||
* @param destinationBounds bounds of the final PiP window
|
||||
*/
|
||||
public void setFinishTaskBounds(int taskId, Rect destinationBounds) {
|
||||
UI_HELPER_EXECUTOR.execute(
|
||||
() -> mController.setFinishTaskBounds(taskId, destinationBounds));
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the input consumer to start intercepting touches in the app window.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user