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

am: cff24b878d

Change-Id: If3aef1ccbba89a4b0964749ee3184a83f88185be
This commit is contained in:
Winson Chung
2019-06-25 15:43:48 -07:00
committed by android-build-merger

View File

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