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

Commit 61962e5c authored by Eric Miao's avatar Eric Miao Committed by Android (Google) Code Review
Browse files

Merge "Track HardwareBuffer native allocations" into main

parents 7a316326 1f9bda8f
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -285,9 +285,8 @@ public final class HardwareBuffer implements Parcelable, AutoCloseable {
    private HardwareBuffer(long nativeObject) {
        mNativeObject = nativeObject;
        long bufferSize = nEstimateSize(nativeObject);
        ClassLoader loader = HardwareBuffer.class.getClassLoader();
        NativeAllocationRegistry registry = new NativeAllocationRegistry(
                loader, nGetNativeFinalizer(), bufferSize);
        NativeAllocationRegistry registry = NativeAllocationRegistry.createNonmalloced(
                HardwareBuffer.class, nGetNativeFinalizer(), bufferSize);
        mCleaner = registry.registerNativeAllocation(this, mNativeObject);
        mCloseGuard.open("HardwareBuffer.close");
    }