diff options
| author | 2016-08-30 17:44:08 +0000 | |
|---|---|---|
| committer | 2016-08-30 17:44:11 +0000 | |
| commit | 0656931d189aa1035c2da2ddbd48cc7ad924ea3c (patch) | |
| tree | bb52bb9ba5cc091315337c22571915696fa42a72 | |
| parent | bad422e647c19d418ba70e4328c0985b48080852 (diff) | |
| parent | f005f5ed88aa67bed6c678a7e89b47e3ec436835 (diff) | |
Merge "android.view.Surface: Add parceling warning" into nyc-mr1-dev
| -rw-r--r-- | core/java/android/view/Surface.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java index dc19d3281507..f92d83af93a0 100644 --- a/core/java/android/view/Surface.java +++ b/core/java/android/view/Surface.java @@ -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); |