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

Commit 5598781a authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Improve SurfaceControlRegistry missing callers when IPC" into main

parents 2250eae1 be1e4e42
Loading
Loading
Loading
Loading
+18 −5
Original line number Diff line number Diff line
@@ -3121,11 +3121,19 @@ public final class SurfaceControl implements Parcelable {
            mNativeObject = nativeObject;
            mFreeNativeResources = sRegistry.registerNativeAllocation(this, mNativeObject);
            setUpForSurfaceControlRegistry();
            if (SurfaceControlRegistry.sCallStackDebuggingEnabled) {
                SurfaceControlRegistry.getProcessInstance().checkCallStackDebugging(
                        "ctor", this, null, null);
            }
        }

        private Transaction(Parcel in) {
            readFromParcel(in);
            setUpForSurfaceControlRegistry();
            readFromParcel(in);
            if (SurfaceControlRegistry.sCallStackDebuggingEnabled) {
                SurfaceControlRegistry.getProcessInstance().checkCallStackDebugging(
                        "ctor", this, null, null);
            }
        }

        /**
@@ -3138,10 +3146,6 @@ public final class SurfaceControl implements Parcelable {
            mCalls = SurfaceControlRegistry.sLogAllTxCallsOnApply
                    ? new ArrayList<>()
                    : null;
            if (SurfaceControlRegistry.sCallStackDebuggingEnabled) {
                SurfaceControlRegistry.getProcessInstance().checkCallStackDebugging(
                        "ctor", this, null, null);
            }
        }

        /**
@@ -5401,6 +5405,12 @@ public final class SurfaceControl implements Parcelable {

            dest.writeInt(1);
            nativeWriteTransactionToParcel(mNativeObject, dest);
            if (mCalls != null) {
                dest.writeInt(1);
                dest.writeStringList(mCalls);
            } else {
                dest.writeInt(0);
            }
            if ((flags & Parcelable.PARCELABLE_WRITE_RETURN_VALUE) != 0) {
                nativeClearTransaction(mNativeObject);
            }
@@ -5410,6 +5420,9 @@ public final class SurfaceControl implements Parcelable {
            mNativeObject = 0;
            if (in.readInt() != 0) {
                mNativeObject = nativeReadTransactionFromParcel(in);
                if (in.readInt() != 0) {
                    in.readStringList(mCalls);
                }
                mFreeNativeResources = sRegistry.registerNativeAllocation(this, mNativeObject);
            }
        }