James O'Leary bbfe962fff Fix crash when number of pixels < max colors
If extraction is run on a set of pixels whose count is less than the
number of max colors, then colors.length < max colors, and accesses
to colors[index] inside the for loop throw an ArrayOutOfBoundsException.

Test: add widget to home screen, reduce size of widget to small area.
observe crash. `mp core services` with fix, observe that crash no longer
occurs. `mp core services` again without fix, verify crash occurs after
boot.
Fixes: 181130209

Change-Id: I60bf1ab39f7a69f2fb0745049fd46d2f0b53a12c
2021-03-03 10:46:16 -05:00
…
…
…
…
…
…
…
Description
No description provided
21 GiB
Languages
Java 73.7%
Kotlin 14%
PowerBuilder 5.8%
C++ 5.2%
AIDL 1%