Bug 1372040 - Temporary showing large icons for AdaptiveIconDrawable. r=maliu
authorNevin Chen <cnevinchen@gmail.com>
Wed, 06 Sep 2017 12:09:31 +0800
changeset 429097 dd75dcec7da162d8ceaaf0883e0e7561bd772992
parent 429096 3781d3cf10ffdea9447866301d69a7817cb907d0
child 429142 fd1ab37308c5cf0e1fd2471708f53d8e6ddc69aa
child 429146 44fb9477f42fe368b4c9ebd968887439d70dd93d
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaliu
bugs1372040, 1397174
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
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;