Add leash check in PipTaskOrganizer#fadeExistingPip

Bug: 197319184
Test: N/A, not sable to reproduce the issue, adding protection based on
      the stack trace
Change-Id: I6363dd425eac6332f59fe1fed074c6518227580f
This commit is contained in:
Hongwei Wang
2022-01-25 13:20:03 -08:00
parent 489cec0276
commit 4353053c87

View File

@@ -825,6 +825,10 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
}
private void fadeExistingPip(boolean show) {
if (mLeash == null || !mLeash.isValid()) {
Log.w(TAG, "Invalid leash on fadeExistingPip: " + mLeash);
return;
}
final float alphaStart = show ? 0 : 1;
final float alphaEnd = show ? 1 : 0;
mPipAnimationController