Revert "Limit maximum allowed size for a status bar icon"

This reverts commit 3a62e9ffaad2d81bf176decb7b60266bd6005301.

Reason for revert: Regression (eg: b/183696500) caused by security fix. Revert needed to respin May MPR build.

Change-Id: If9e34a0120121ed851b911c8a8bd2bbe0e0f9e34
(cherry picked from commit 2455fc526470713c22b3a0a8d7f4a3ec910fa61c)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
index 25ae5c2..8cf8a22 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
@@ -83,9 +83,6 @@
     public static final int STATE_DOT = 1;
     public static final int STATE_HIDDEN = 2;
 
-    /** Maximum allowed width or height for an icon drawable */
-    private static final int MAX_IMAGE_SIZE = 500;
-
     private static final String TAG = "StatusBarIconView";
     private static final Property<StatusBarIconView, Float> ICON_APPEAR_AMOUNT
             = new FloatProperty<StatusBarIconView>("iconAppearAmount") {
@@ -381,13 +378,6 @@
             Log.w(TAG, "No icon for slot " + mSlot + "; " + mIcon.icon);
             return false;
         }
-
-        if (drawable.getIntrinsicWidth() > MAX_IMAGE_SIZE
-                || drawable.getIntrinsicHeight() > MAX_IMAGE_SIZE) {
-            Log.w(TAG, "Drawable is too large " + mIcon);
-            return false;
-        }
-
         if (withClear) {
             setImageDrawable(null);
         }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarIconViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarIconViewTest.java
index daa805a..9971e0c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarIconViewTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarIconViewTest.java
@@ -35,7 +35,6 @@
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
 import android.content.res.Resources;
-import android.graphics.Bitmap;
 import android.graphics.Color;
 import android.graphics.drawable.Icon;
 import android.os.UserHandle;
@@ -124,13 +123,4 @@
         assertEquals("Transparent backgrounds should fallback to drawable color",
                 color, mIconView.getStaticDrawableColor());
     }
-
-    @Test
-    public void testGiantImageNotAllowed() {
-        Bitmap largeBitmap = Bitmap.createBitmap(1000, 1000, Bitmap.Config.ARGB_8888);
-        Icon icon = Icon.createWithBitmap(largeBitmap);
-        StatusBarIcon largeIcon = new StatusBarIcon(UserHandle.ALL, "mockPackage",
-                icon, 0, 0, "");
-        assertFalse(mIconView.set(largeIcon));
-    }
 }
\ No newline at end of file