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

Commit eba632d6 authored by Sally Qi's avatar Sally Qi Committed by Android (Google) Code Review
Browse files

Merge "Fix DataSpaceTest cts issue."

parents c31d3083 6f66de2c
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1124,6 +1124,8 @@ public class ImageReader implements AutoCloseable {
    private class SurfaceImage extends android.media.Image {
        public SurfaceImage(int format) {
            mFormat = format;
            mHardwareBufferFormat = ImageReader.this.mHardwareBufferFormat;
            mDataSpace = ImageReader.this.mDataSpace;
        }

        SurfaceImage(int hardwareBufferFormat, long dataSpace) {
@@ -1228,6 +1230,12 @@ public class ImageReader implements AutoCloseable {
            return nativeGetHardwareBuffer();
        }

        @Override
        public long getDataSpace() {
            throwISEIfImageIsInvalid();
            return mDataSpace;
        }

        @Override
        public void setTimestamp(long timestampNs) {
            throwISEIfImageIsInvalid();