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

Commit 5f4c4ddf authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Check if the surface control is released before setting metadata on it

Bug: 145096599
Test: Checked setting metadata on a released surfacecontrol throws an exception
Change-Id: I85ed44acffff4d265dd37898ec67e6071c2d938d
parent 8cca880b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2601,6 +2601,7 @@ public final class SurfaceControl implements Parcelable {
         * @hide
         */
        public Transaction setMetadata(SurfaceControl sc, int key, Parcel data) {
            sc.checkNotReleased();
            nativeSetMetadata(mNativeObject, sc.mNativeObject, key, data);
            return this;
        }