Bug 1372040 - Temporary showing large icons for AdaptiveIconDrawable. r=maliu

I don't want to call BitmapUtils.getBitmapFromDrawable() here for AdaptiveIconDrawable cause there might be performance impact if I create bitmap in main thread.
I'll use bug 1397174 to follow up this issue.

MozReview-Commit-ID: 64FE2MOk5g0

--HG--
extra : rebase_source : 041e0a5f9d7b4245650f5a229603818b11631b4e
This commit is contained in:
Nevin Chen 2017-09-06 12:09:31 +08:00
Родитель 171beb013a
Коммит 4a44c9d515
1 изменённых файлов: 2 добавлений и 5 удалений

Просмотреть файл

@ -121,12 +121,9 @@ public class PromptListAdapter extends ArrayAdapter<PromptListItem> {
if (icon instanceof BitmapDrawable) {
Bitmap bitmap = ((BitmapDrawable) icon).getBitmap();
d = new BitmapDrawable(res, Bitmap.createScaledBitmap(bitmap, mIconSize, mIconSize, true));
} else if (icon instanceof VectorDrawable) {
// If it's a VectorDrawable, we don't need to scale it.
d = icon;
} else {
// Other than that, we just use blank.
d = getBlankDrawable(res);
// FIXME: Fix scale issue for AdaptiveIconDrawable in bug 1397174
d = icon;
}
} else if (item.inGroup) {