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

Commit 17d10609 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Add timeout log if sync transaction is not applied" into main

parents 259ce764 2ea6d96b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -11910,6 +11910,12 @@ public final class ViewRootImpl implements ViewParent,
                if (syncBuffer) {
                    boolean result = mBlastBufferQueue.syncNextTransaction(transaction -> {
                        Runnable timeoutRunnable = () -> Log.e(mTag,
                                "Failed to submit the sync transaction after 4s. Likely to ANR "
                                        + "soon");
                        mHandler.postDelayed(timeoutRunnable, 4L * Build.HW_TIMEOUT_MULTIPLIER);
                        transaction.addTransactionCommittedListener(mSimpleExecutor,
                                () -> mHandler.removeCallbacks(timeoutRunnable));
                        surfaceSyncGroup.addTransaction(transaction);
                        surfaceSyncGroup.markSyncReady();
                    });