Fix release build
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package com.android.quickstep.util;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.graphics.HardwareRenderer;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
@@ -78,22 +79,25 @@ public class SurfaceTransactionApplier extends ReleaseCheck {
|
||||
mLastSequenceNumber++;
|
||||
final int toApplySeqNo = mLastSequenceNumber;
|
||||
setCanRelease(false);
|
||||
mTargetViewRootImpl.registerRtFrameCallback(frame -> {
|
||||
if (mBarrierSurfaceControl == null || !mBarrierSurfaceControl.isValid()) {
|
||||
mTargetViewRootImpl.registerRtFrameCallback(new HardwareRenderer.FrameDrawingCallback() {
|
||||
@Override
|
||||
public void onFrameDraw(long frame) {
|
||||
if (mBarrierSurfaceControl == null || !mBarrierSurfaceControl.isValid()) {
|
||||
Message.obtain(mApplyHandler, MSG_UPDATE_SEQUENCE_NUMBER, toApplySeqNo, 0)
|
||||
.sendToTarget();
|
||||
return;
|
||||
}
|
||||
Transaction t = new Transaction();
|
||||
for (int i = params.length - 1; i >= 0; i--) {
|
||||
SurfaceParams surfaceParams = params[i];
|
||||
if (surfaceParams.surface.isValid()) {
|
||||
surfaceParams.applyTo(t);
|
||||
}
|
||||
}
|
||||
mTargetViewRootImpl.mergeWithNextTransaction(t, frame);
|
||||
Message.obtain(mApplyHandler, MSG_UPDATE_SEQUENCE_NUMBER, toApplySeqNo, 0)
|
||||
.sendToTarget();
|
||||
return;
|
||||
}
|
||||
Transaction t = new Transaction();
|
||||
for (int i = params.length - 1; i >= 0; i--) {
|
||||
SurfaceParams surfaceParams = params[i];
|
||||
if (surfaceParams.surface.isValid()) {
|
||||
surfaceParams.applyTo(t);
|
||||
}
|
||||
}
|
||||
mTargetViewRootImpl.mergeWithNextTransaction(t, frame);
|
||||
Message.obtain(mApplyHandler, MSG_UPDATE_SEQUENCE_NUMBER, toApplySeqNo, 0)
|
||||
.sendToTarget();
|
||||
});
|
||||
|
||||
// Make sure a frame gets scheduled.
|
||||
|
||||
Reference in New Issue
Block a user