Fix a crash caused by transaction

A native transaction passed from webview is sent back to native side, so java side does not manage the life cycle of the transaction.

Bug: 191414767
Test: Play a video, switch to another app, wait for 10 seconds
Change-Id: I013052c202b445438d6cb6497f5f9a2fc22a2b85
This commit is contained in:
Huihong Luo
2021-06-24 10:04:32 -07:00
parent ef1bb2c9fa
commit 4df4151bc0
9 changed files with 29 additions and 26 deletions

View File

@@ -131,4 +131,12 @@ public final class BLASTBufferQueue {
nativeMergeWithNextTransaction(mNativeObject, t.mNativeObject, frameNumber);
}
/**
* Merge the transaction passed in to the next transaction in BlastBufferQueue.
* @param nativeTransaction native handle passed from native c/c++ code.
*/
public void mergeWithNextTransaction(long nativeTransaction, long frameNumber) {
nativeMergeWithNextTransaction(mNativeObject, nativeTransaction, frameNumber);
}
}

View File

@@ -912,7 +912,7 @@ public class HardwareRenderer {
* @param aSurfaceControlNativeObj ASurfaceControl native object handle
* @param frame The id of the frame being drawn.
*/
void onMergeTransaction(long aSurfaceTranactionNativeObj,
boolean onMergeTransaction(long aSurfaceTranactionNativeObj,
long aSurfaceControlNativeObj, long frame);
}