Merge "Catch all exceptions in onFrameDraw" into qt-dev

This commit is contained in:
Winson Chung
2019-06-25 22:07:44 +00:00
committed by Android (Google) Code Review

View File

@@ -1107,7 +1107,13 @@ public final class ViewRootImpl implements ViewParent,
*/
public void registerRtFrameCallback(FrameDrawingCallback callback) {
if (mAttachInfo.mThreadedRenderer != null) {
mAttachInfo.mThreadedRenderer.registerRtFrameCallback(callback);
mAttachInfo.mThreadedRenderer.registerRtFrameCallback(frame -> {
try {
callback.onFrameDraw(frame);
} catch (Exception e) {
Log.e(TAG, "Exception while executing onFrameDraw", e);
}
});
}
}