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

Commit 5559bb04 authored by Priyanka Advani (xWF)'s avatar Priyanka Advani (xWF) Committed by Android (Google) Code Review
Browse files

Merge "Revert "Track HardwareBuffer native allocations"" into main

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