Using inline definition of FrameDrawingCallback instead of lambda as it fails on some devices

Bug: 148194313
Test: None, just a guess that it will fix the issue
Change-Id: Ifec1d27992752bded82a0091e29daff9e8d25d46
This commit is contained in:
Sunny Goyal
2020-06-02 12:23:37 -07:00
parent 28fdf609dc
commit d0642f706f

View File

@@ -15,6 +15,7 @@
*/
package com.android.systemui.shared.system;
import android.graphics.HardwareRenderer;
import android.view.SurfaceControl;
import android.view.View;
import android.view.ViewRootImpl;
@@ -50,7 +51,13 @@ public class ViewRootImplCompat {
public void registerRtFrameCallback(LongConsumer callback) {
if (mViewRoot != null) {
mViewRoot.registerRtFrameCallback(callback::accept);
mViewRoot.registerRtFrameCallback(
new HardwareRenderer.FrameDrawingCallback() {
@Override
public void onFrameDraw(long l) {
callback.accept(l);
}
});
}
}
}