Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4360f83 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Catch Exception to avoid SyncCallback residue" into main am: df8b3d75 am: 10a6a70e

parents e46121c8 10a6a70e
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -192,15 +192,22 @@ public final class SyncTransactionQueue {
                throw new IllegalStateException("Sync Transactions must be serialized. In Flight: "
                        + mInFlight.mId + " - " + mInFlight.mWCT);
            }
            mInFlight = this;
            if (DEBUG) Slog.d(TAG, "Sending sync transaction: " + mWCT);
            try {
                if (mLegacyTransition != null) {
                    mId = new WindowOrganizer().startLegacyTransition(mLegacyTransition.getType(),
                            mLegacyTransition.getAdapter(), this, mWCT);
                } else {
                    mId = new WindowOrganizer().applySyncTransaction(mWCT, this);
                }
            } catch (RuntimeException e) {
                Slog.e(TAG, "Send failed", e);
                // Finish current sync callback immediately.
                onTransactionReady(mId, new SurfaceControl.Transaction());
                return;
            }
            if (DEBUG) Slog.d(TAG, " Sent sync transaction. Got id=" + mId);
            mInFlight = this;
            mMainExecutor.executeDelayed(mOnReplyTimeout, REPLY_TIMEOUT);
        }