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

Commit 8485497c authored by James Shargo's avatar James Shargo
Browse files

surface: Update the native alloc flag to read-only version

Bug: 306193257
Bug: 321628587
Test: atest
Change-Id: I68308f387dccc94afb25ce31dd5db6ffeef38715
parent f6b47833
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1256,13 +1256,13 @@ public class Surface implements Parcelable {
    }

    private static void registerNativeMemoryUsage() {
        if (Flags.enableSurfaceNativeAllocRegistration()) {
        if (Flags.enableSurfaceNativeAllocRegistrationRo()) {
            VMRuntime.getRuntime().registerNativeAllocation(SURFACE_NATIVE_ALLOCATION_SIZE_BYTES);
        }
    }

    private static void freeNativeMemoryUsage() {
        if (Flags.enableSurfaceNativeAllocRegistration()) {
        if (Flags.enableSurfaceNativeAllocRegistrationRo()) {
            VMRuntime.getRuntime().registerNativeFree(SURFACE_NATIVE_ALLOCATION_SIZE_BYTES);
        }
    }