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

Commit 286b1a83 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by android-build-merger
Browse files

android.view.Surface: Add parceling warning

am: f005f5ed

Change-Id: Id2c772873fbf98653e751036790484d0fbf7bb16
parents 4af40ef4 f005f5ed
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -459,6 +459,8 @@ public class Surface implements Parcelable {
            // create a new native Surface and return it after reducing
            // the reference count on mNativeObject.  Either way, it is
            // not necessary to call nativeRelease() here.
            // NOTE: This must be kept synchronized with the native parceling code
            // in frameworks/native/libs/Surface.cpp
            mName = source.readString();
            mIsSingleBuffered = source.readInt() != 0;
            setNativeObjectLocked(nativeReadFromParcel(mNativeObject, source));
@@ -471,6 +473,8 @@ public class Surface implements Parcelable {
            throw new IllegalArgumentException("dest must not be null");
        }
        synchronized (mLock) {
            // NOTE: This must be kept synchronized with the native parceling code
            // in frameworks/native/libs/Surface.cpp
            dest.writeString(mName);
            dest.writeInt(mIsSingleBuffered ? 1 : 0);
            nativeWriteToParcel(mNativeObject, dest);