Make sure the color space range is checked properly.

We only want to accept pre-defined color space,without the check it's possible
that the color space is not pre-defined and thus can't be restored.

BUG: b/116112787, b/130737691
Test: build
Change-Id: Ic1d21501828d3edc5ad04534fece70a7146e78bd
1 file changed