Merge "Check for null mLeash before setting alpha." into tm-dev

This commit is contained in:
Mateusz Cicheński
2022-05-25 16:35:38 +00:00
committed by Android (Google) Code Review

View File

@@ -970,6 +970,11 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
if (!isInPip()) {
return;
}
if (mLeash == null || !mLeash.isValid()) {
ProtoLog.w(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
"%s: Invalid leash on setPipVisibility: %s", TAG, mLeash);
return;
}
final SurfaceControl.Transaction tx =
mSurfaceControlTransactionFactory.getTransaction();
mSurfaceTransactionHelper.alpha(tx, mLeash, visible ? 1f : 0f);