Merge "Fix rare edge-cases pip crashes" into tm-qpr-dev am: a6e0a8eaf7 am: 0b24dc057b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20916320 Change-Id: If8e8fef364a88c3028884c5cbe81a7777f420cf8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -662,8 +662,8 @@ public class PipTransition extends PipTransitionController {
|
||||
}
|
||||
|
||||
// Please file a bug to handle the unexpected transition type.
|
||||
throw new IllegalStateException("Entering PIP with unexpected transition type="
|
||||
+ transitTypeToString(transitType));
|
||||
android.util.Slog.e(TAG, "Found new PIP in transition with mis-matched type="
|
||||
+ transitTypeToString(transitType), new Throwable());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -333,6 +333,9 @@ public class PhonePipMenuController implements PipMenuController {
|
||||
mTmpDestinationRectF.set(destinationBounds);
|
||||
mMoveTransform.setRectToRect(mTmpSourceRectF, mTmpDestinationRectF, Matrix.ScaleToFit.FILL);
|
||||
final SurfaceControl surfaceControl = getSurfaceControl();
|
||||
if (surfaceControl == null) {
|
||||
return;
|
||||
}
|
||||
final SurfaceControl.Transaction menuTx =
|
||||
mSurfaceControlTransactionFactory.getTransaction();
|
||||
menuTx.setMatrix(surfaceControl, mMoveTransform, mTmpTransform);
|
||||
@@ -359,6 +362,9 @@ public class PhonePipMenuController implements PipMenuController {
|
||||
}
|
||||
|
||||
final SurfaceControl surfaceControl = getSurfaceControl();
|
||||
if (surfaceControl == null) {
|
||||
return;
|
||||
}
|
||||
final SurfaceControl.Transaction menuTx =
|
||||
mSurfaceControlTransactionFactory.getTransaction();
|
||||
menuTx.setCrop(surfaceControl, destinationBounds);
|
||||
|
||||
Reference in New Issue
Block a user