Loading graphics/java/android/graphics/drawable/Icon.java +24 −17 Original line number Diff line number Diff line Loading @@ -494,7 +494,7 @@ public final class Icon implements Parcelable { BitmapFactory.decodeByteArray(getDataBytes(), getDataOffset(), getDataLength()))); case TYPE_URI: InputStream is = getUriInputStream(context); try (InputStream is = getUriInputStream(context)) { if (is != null) { final Bitmap bitmap = BitmapFactory.decodeStream(is); if (bitmap == null) { Loading @@ -505,9 +505,12 @@ public final class Icon implements Parcelable { } return new BitmapDrawable(context.getResources(), fixMaxBitmapSize(bitmap)); } } catch (IOException e) { throw new IllegalStateException(e); } break; case TYPE_URI_ADAPTIVE_BITMAP: is = getUriInputStream(context); try (InputStream is = getUriInputStream(context)) { if (is != null) { final Bitmap bitmap = BitmapFactory.decodeStream(is); if (bitmap == null) { Loading @@ -516,9 +519,13 @@ public final class Icon implements Parcelable { return null; } } return new AdaptiveIconDrawable(null, new BitmapDrawable(context.getResources(), return new AdaptiveIconDrawable( null, new BitmapDrawable(context.getResources(), fixMaxBitmapSize(bitmap))); } } catch (IOException e) { throw new IllegalStateException(e); } break; } return null; Loading Loading
graphics/java/android/graphics/drawable/Icon.java +24 −17 Original line number Diff line number Diff line Loading @@ -494,7 +494,7 @@ public final class Icon implements Parcelable { BitmapFactory.decodeByteArray(getDataBytes(), getDataOffset(), getDataLength()))); case TYPE_URI: InputStream is = getUriInputStream(context); try (InputStream is = getUriInputStream(context)) { if (is != null) { final Bitmap bitmap = BitmapFactory.decodeStream(is); if (bitmap == null) { Loading @@ -505,9 +505,12 @@ public final class Icon implements Parcelable { } return new BitmapDrawable(context.getResources(), fixMaxBitmapSize(bitmap)); } } catch (IOException e) { throw new IllegalStateException(e); } break; case TYPE_URI_ADAPTIVE_BITMAP: is = getUriInputStream(context); try (InputStream is = getUriInputStream(context)) { if (is != null) { final Bitmap bitmap = BitmapFactory.decodeStream(is); if (bitmap == null) { Loading @@ -516,9 +519,13 @@ public final class Icon implements Parcelable { return null; } } return new AdaptiveIconDrawable(null, new BitmapDrawable(context.getResources(), return new AdaptiveIconDrawable( null, new BitmapDrawable(context.getResources(), fixMaxBitmapSize(bitmap))); } } catch (IOException e) { throw new IllegalStateException(e); } break; } return null; Loading