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

Commit 935dd029 authored by Sunny Goyal's avatar Sunny Goyal Committed by Automerger Merge Worker
Browse files

Merge "Using inline definition of FrameDrawingCallback instead of lambda as it...

Merge "Using inline definition of FrameDrawingCallback instead of lambda as it fails on some devices" into rvc-dev am: a38a553c am: b5e88fa6 am: a139078e am: 9b78a205

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

Change-Id: If46e2e8a5e40795a98e68cb24305db3be3d6cb7d
parents 8d8e7a9f 9b78a205
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -15,6 +15,7 @@
 */
 */
package com.android.systemui.shared.system;
package com.android.systemui.shared.system;


import android.graphics.HardwareRenderer;
import android.view.SurfaceControl;
import android.view.SurfaceControl;
import android.view.View;
import android.view.View;
import android.view.ViewRootImpl;
import android.view.ViewRootImpl;
@@ -50,7 +51,13 @@ public class ViewRootImplCompat {


    public void registerRtFrameCallback(LongConsumer callback) {
    public void registerRtFrameCallback(LongConsumer callback) {
        if (mViewRoot != null) {
        if (mViewRoot != null) {
            mViewRoot.registerRtFrameCallback(callback::accept);
            mViewRoot.registerRtFrameCallback(
                    new HardwareRenderer.FrameDrawingCallback() {
                        @Override
                        public void onFrameDraw(long l) {
                            callback.accept(l);
                        }
                    });
        }
        }
    }
    }
}
}