diff --git a/mobile/android/base/gfx/BitmapUtils.java b/mobile/android/base/gfx/BitmapUtils.java index 53c4f1b6bd23..e4d99356a385 100644 --- a/mobile/android/base/gfx/BitmapUtils.java +++ b/mobile/android/base/gfx/BitmapUtils.java @@ -27,7 +27,6 @@ import org.mozilla.gecko.R; import java.io.IOException; import java.io.InputStream; import java.lang.reflect.Field; -import java.lang.NoSuchFieldException; import java.net.MalformedURLException; import java.net.URL; @@ -82,19 +81,6 @@ public final class BitmapUtils { return; } - if(data.startsWith("-moz-icon://")) { - Uri imageUri = Uri.parse(data); - String resource = imageUri.getSchemeSpecificPart(); - resource = resource.substring(resource.lastIndexOf('/') + 1); - - try { - Drawable d = context.getPackageManager().getApplicationIcon(resource); - loader.onBitmapFound(d); - } catch(Exception ex) { } - - return; - } - if(data.startsWith("drawable://")) { Uri imageUri = Uri.parse(data); int id = getResource(imageUri, R.drawable.ic_status_logo); @@ -296,28 +282,11 @@ public final class BitmapUtils { if ("drawable".equals(scheme)) { String resource = resourceUrl.getSchemeSpecificPart(); resource = resource.substring(resource.lastIndexOf('/') + 1); - try { final Class drawableClass = R.drawable.class; final Field f = drawableClass.getField(resource); icon = f.getInt(null); - } catch (final NoSuchFieldException e1) { - - // just means the resource doesn't exist for fennec. Check in Android resources - try { - final Class drawableClass = android.R.drawable.class; - final Field f = drawableClass.getField(resource); - icon = f.getInt(null); - } catch (final NoSuchFieldException e2) { - // This drawable doesn't seem to exist... - } catch(Exception e3) { - Log.i(LOGTAG, "Exception getting drawable", e3); - } - - } catch (Exception e4) { - Log.i(LOGTAG, "Exception getting drawable", e4); - } - + } catch (final Exception e) {} // just means the resource doesn't exist resourceUrl = null; } return icon;