Merge "Fix Invalid Surface error" into main am: c3199051ac am: a412668aea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2670876 Change-Id: Ia00e6d464c571d366dee8eb85052b9ababbc5941 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -63,6 +63,8 @@ import java.util.function.Supplier;
|
|||||||
*/
|
*/
|
||||||
class SurfaceAnimationRunner {
|
class SurfaceAnimationRunner {
|
||||||
|
|
||||||
|
private static final String TAG = SurfaceAnimationRunner.class.getSimpleName();
|
||||||
|
|
||||||
private final Object mLock = new Object();
|
private final Object mLock = new Object();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -186,6 +188,16 @@ class SurfaceAnimationRunner {
|
|||||||
// We must wait for t to be committed since otherwise the leash doesn't have the
|
// We must wait for t to be committed since otherwise the leash doesn't have the
|
||||||
// windows we want to screenshot and extend as children.
|
// windows we want to screenshot and extend as children.
|
||||||
t.addTransactionCommittedListener(mEdgeExtensionExecutor, () -> {
|
t.addTransactionCommittedListener(mEdgeExtensionExecutor, () -> {
|
||||||
|
if (!animationLeash.isValid()) {
|
||||||
|
Log.e(TAG, "Animation leash is not valid");
|
||||||
|
synchronized (mEdgeExtensionLock) {
|
||||||
|
mEdgeExtensions.remove(animationLeash);
|
||||||
|
}
|
||||||
|
synchronized (mLock) {
|
||||||
|
mPreProcessingAnimations.remove(animationLeash);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
final WindowAnimationSpec animationSpec = a.asWindowAnimationSpec();
|
final WindowAnimationSpec animationSpec = a.asWindowAnimationSpec();
|
||||||
|
|
||||||
final Transaction edgeExtensionCreationTransaction = new Transaction();
|
final Transaction edgeExtensionCreationTransaction = new Transaction();
|
||||||
@@ -450,8 +462,7 @@ class SurfaceAnimationRunner {
|
|||||||
// The leash we are trying to screenshot may have been removed by this point, which is
|
// The leash we are trying to screenshot may have been removed by this point, which is
|
||||||
// likely the reason for ending up with a null edgeBuffer, in which case we just want to
|
// likely the reason for ending up with a null edgeBuffer, in which case we just want to
|
||||||
// return and do nothing.
|
// return and do nothing.
|
||||||
Log.e("SurfaceAnimationRunner", "Failed to create edge extension - "
|
Log.e(TAG, "Failed to create edge extension - edge buffer is null");
|
||||||
+ "edge buffer is null");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user