Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca29bb28 authored by Joe Onorato's avatar Joe Onorato Committed by Android (Google) Code Review
Browse files

Merge "Don't crash with non-standard bitmap types." into honeycomb

parents f4c4b666 f01345e1
Loading
Loading
Loading
Loading
+14 −11
Original line number Diff line number Diff line
@@ -796,7 +796,9 @@ public class RemoteViews implements Parcelable, Filter {
                    if (this.value != null) {
                        final Bitmap b = (Bitmap) this.value;
                        final Bitmap.Config c = b.getConfig();
                        // If we don't know, be pessimistic and assume 4
                        int bpp = 4;
                        if (c != null) {
                            switch (c) {
                            case ALPHA_8:
                                bpp = 1;
@@ -809,6 +811,7 @@ public class RemoteViews implements Parcelable, Filter {
                                bpp = 4;
                                break;
                            }
                        }
                        counter.bitmapIncrement(b.getWidth() * b.getHeight() * bpp);
                    }
                    break;