Merge "Shorten the timeout of finish call to 10 seconds" into sc-v2-dev am: 7108950503 am: 6c0cb2fcec

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

Change-Id: I8e7f3b313b425eba92808f7469610e9217a14841
This commit is contained in:
Wu Ahan
2021-09-08 21:27:28 +00:00
committed by Automerger Merge Worker

View File

@@ -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));
}
}