diff options
| author | 2020-06-02 12:23:37 -0700 | |
|---|---|---|
| committer | 2020-06-02 12:41:21 -0700 | |
| commit | d0642f706f42dcd2effce32b431ef2a45fe51ec9 (patch) | |
| tree | 438820c574d3a82d1be1e0cd38e54408816c295a | |
| parent | 28fdf609dcce30f9825006d60f6a45b4cc4d88dd (diff) | |
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
| -rw-r--r-- | packages/SystemUI/shared/src/com/android/systemui/shared/system/ViewRootImplCompat.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ViewRootImplCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ViewRootImplCompat.java index dd613263e5c2..73783ae7ece2 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ViewRootImplCompat.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ViewRootImplCompat.java @@ -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); + } + }); } } } |