No auto-pip animation if SysUI is not available

The Launcher crash in the bug is a consequence of SysUI being stopped
due to ANR. In this rare case, we should not start the auto-pip
animation to further crash the launcher.

Bug: 245947669
Test: N/A
Change-Id: I2e99a82d4dccf302788fdb0752f70091fe5a18a3
This commit is contained in:
Hongwei Wang committed 2022-09-15 12:49:29 -07:00
1 parent e58e123bd7
commit 7da9a38669
2 files changed
+10

No files matched your search

@@ -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) {