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

Commit df8b3d75 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Catch Exception to avoid SyncCallback residue" into main

parents 3a3ab97b 843adbc7
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);
        }