Merge "Make sure the color space range is checked properly." into qt-dev

am: 53e38f260c

Change-Id: Ie0df202cd479cc062acd426af5553214b61ca1d2
This commit is contained in:
Peiyong Lin
2019-04-17 19:36:02 -07:00
committed by android-build-merger

View File

@@ -1863,7 +1863,7 @@ public class ActivityManager {
mTopActivityComponent = ComponentName.readFromParcel(source);
mSnapshot = source.readParcelable(null /* classLoader */);
int colorSpaceId = source.readInt();
mColorSpace = colorSpaceId >= 0
mColorSpace = colorSpaceId >= 0 && colorSpaceId < ColorSpace.Named.values().length
? ColorSpace.get(ColorSpace.Named.values()[colorSpaceId])
: ColorSpace.get(ColorSpace.Named.SRGB);
mOrientation = source.readInt();