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

Commit 1f9bda8f authored by Eric Miao's avatar Eric Miao
Browse files

Track HardwareBuffer native allocations

Bug: 331243037
Flag: EXEMPT refactor

Change-Id: I2923b497d628c00acffd7286525df01e319121ea
parent 9eddbabc
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");
    }