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

Commit 71089505 authored by Wu Ahan's avatar Wu Ahan Committed by Android (Google) Code Review
Browse files

Merge "Shorten the timeout of finish call to 10 seconds" into sc-v2-dev

parents bdb91bf0 6f787a75
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -288,12 +288,12 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener
            // We don't remove observer here,
            // will remove it when all the frame metrics in this duration are called back.
            // See onFrameMetricsAvailable for the logic of removing the observer.
            // Let's wait for all callbacks to finish for at most a minute.
            // Waiting at most 10 seconds for all callbacks to finish.
            mWaitForFinishTimedOut = () -> {
                Log.e(TAG, "force finish cuj because of time out:" + mSession.getName());
                finish(mJankInfos.size() - 1);
            };
            mHandler.postDelayed(mWaitForFinishTimedOut, TimeUnit.MINUTES.toMillis(1));
            mHandler.postDelayed(mWaitForFinishTimedOut, TimeUnit.SECONDS.toMillis(10));
        }
    }