Fix ColorSpace#get allocating
Test: none Change-Id: Ia4d380a74ac8f99ac408f52a602713823db43f50
This commit is contained in:
@@ -1380,9 +1380,9 @@ public abstract class ColorSpace {
|
||||
*/
|
||||
@NonNull
|
||||
static ColorSpace get(@IntRange(from = MIN_ID, to = MAX_ID) int index) {
|
||||
if (index < 0 || index >= Named.values().length) {
|
||||
if (index < 0 || index >= sNamedColorSpaces.length) {
|
||||
throw new IllegalArgumentException("Invalid ID, must be in the range [0.." +
|
||||
Named.values().length + ")");
|
||||
sNamedColorSpaces.length + ")");
|
||||
}
|
||||
return sNamedColorSpaces[index];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user