Merge "No auto-pip animation if SysUI is not available" into tm-qpr-dev
This commit is contained in:
@@ -1444,6 +1444,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private SwipePipToHomeAnimator createWindowAnimationToPip(HomeAnimationFactory homeAnimFactory,
|
||||
RemoteAnimationTargetCompat runningTaskTarget, float startProgress) {
|
||||
// Directly animate the app to PiP (picture-in-picture) mode
|
||||
@@ -1469,6 +1470,10 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
runningTaskTarget.taskInfo.pictureInPictureParams,
|
||||
homeRotation,
|
||||
hotseatKeepClearArea);
|
||||
if (destinationBounds == null) {
|
||||
// No destination bounds returned from SystemUI, bail early.
|
||||
return null;
|
||||
}
|
||||
final Rect appBounds = new Rect();
|
||||
final WindowConfiguration winConfig = taskInfo.configuration.windowConfiguration;
|
||||
// Adjust the appBounds for TaskBar by using the calculated window crop Rect
|
||||
|
||||
@@ -45,6 +45,7 @@ import android.view.RemoteAnimationTarget;
|
||||
import android.view.SurfaceControl;
|
||||
import android.window.IOnBackInvokedCallback;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import com.android.internal.logging.InstanceId;
|
||||
@@ -481,6 +482,10 @@ public class SystemUiProxy implements ISystemUiProxy {
|
||||
mPipAnimationListener = listener;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Destination bounds of auto-pip animation, {@code null} if the animation is not ready.
|
||||
*/
|
||||
@Nullable
|
||||
public Rect startSwipePipToHome(ComponentName componentName, ActivityInfo activityInfo,
|
||||
PictureInPictureParams pictureInPictureParams, int launcherRotation,
|
||||
Rect hotseatKeepClearArea) {
|
||||
|
||||
Reference in New Issue
Block a user