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

Commit 6c104968 authored by Vishnu Nair's avatar Vishnu Nair Committed by Automerger Merge Worker
Browse files

Merge "Set timeouts for SurfaceSyncGroup based on HW timeout" into udc-dev am:...

Merge "Set timeouts for SurfaceSyncGroup based on HW timeout" into udc-dev am: 6e40151c am: 0ff4df6c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21994311



Change-Id: I64fbc5391e091174f47e374db02b24b5866a1c58
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 20ae0298 0ff4df6c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -11630,7 +11630,8 @@ public final class ViewRootImpl implements ViewParent,

        mNumPausedForSync++;
        mHandler.removeMessages(MSG_PAUSED_FOR_SYNC_TIMEOUT);
        mHandler.sendEmptyMessageDelayed(MSG_PAUSED_FOR_SYNC_TIMEOUT, 1000);
        mHandler.sendEmptyMessageDelayed(MSG_PAUSED_FOR_SYNC_TIMEOUT,
                1000 * Build.HW_TIMEOUT_MULTIPLIER);
        return mActiveSurfaceSyncGroup;
    };

+2 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.annotation.Nullable;
import android.annotation.UiThread;
import android.os.Binder;
import android.os.BinderProxy;
import android.os.Build;
import android.os.Debug;
import android.os.Handler;
import android.os.HandlerThread;
@@ -62,7 +63,7 @@ public final class SurfaceSyncGroup {
    private static final int MAX_COUNT = 100;

    private static final AtomicInteger sCounter = new AtomicInteger(0);
    private static final int TRANSACTION_READY_TIMEOUT = 1000;
    private static final int TRANSACTION_READY_TIMEOUT = 1000 * Build.HW_TIMEOUT_MULTIPLIER;

    private static Supplier<Transaction> sTransactionFactory = Transaction::new;