Bug 1049217 - Follow-up: remove modern Android method calls until Bug 1042829 lands. a=bustage on a CLOSED TREE

This commit is contained in:
Richard Newman 2014-08-05 20:48:56 -07:00
parent 843748f662
commit c5ac3dc2cf

View File

@ -63,7 +63,10 @@ public class LocaleListPreference extends ListPreference {
private static byte[] getPixels(final Bitmap b) { private static byte[] getPixels(final Bitmap b) {
final int byteCount; final int byteCount;
if (Versions.feature19Plus) { if (Versions.feature19Plus) {
byteCount = b.getAllocationByteCount(); // TODO: when Bug 1042829 lands, do the right thing for KitKat devices.
// Which is:
// byteCount = b.getAllocationByteCount();
byteCount = b.getRowBytes() * b.getHeight();
} else { } else {
// Close enough for government work. // Close enough for government work.
// Equivalent to getByteCount, but works on <12. // Equivalent to getByteCount, but works on <12.