Bug 1372040 - Temporary showing large icons for AdaptiveIconDrawable. r=maliu, a=lizzard
authorNevin Chen <cnevinchen@gmail.com>
Wed, 06 Sep 2017 12:09:31 +0800
changeset 424039 df29a08ea4310d0de72c3b6bd721356191c7f40b
parent 424038 a566b0235ef9ead152b01156d4e9ddd4ff65bfef
child 424040 94cf7f1ee06b817dd8fa4d76bf63cef15de3b4e2
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaliu, lizzard
bugs1372040, 1397174
milestone56.0
Bug 1372040 - Temporary showing large icons for AdaptiveIconDrawable. r=maliu, a=lizzard 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
mobile/android/base/java/org/mozilla/gecko/prompts/PromptListAdapter.java
--- a/mobile/android/base/java/org/mozilla/gecko/prompts/PromptListAdapter.java
+++ b/mobile/android/base/java/org/mozilla/gecko/prompts/PromptListAdapter.java
@@ -116,22 +116,19 @@ public class PromptListAdapter extends A
         // Set the padding between the icon and the text.
         t.setCompoundDrawablePadding(mIconTextPadding);
         if (icon != null) {
             // We want the icon to be of a specific size. Some do not
             // follow this rule so we have to resize them.
             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.
+            } else {
+                // FIXME: Fix scale issue for AdaptiveIconDrawable in bug 1397174
                 d = icon;
-            } else {
-                // Other than that, we just use blank.
-                d = getBlankDrawable(res);
             }
 
         } else if (item.inGroup) {
             // We don't currently support "indenting" items with icons
             d = getBlankDrawable(res);
         }
 
         Drawable moreDrawable = null;