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

Commit 701bb5b7 authored by Doris Liu's avatar Doris Liu Committed by Android (Google) Code Review
Browse files

Merge "Fix crash when creating a HW Bitmap on a detached view" into oc-mr1-dev

parents 4a324cb1 4dc1ec75
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -159,6 +159,9 @@ public class TransitionUtils {
     * @return A bitmap of the given view or null if bounds has no width or height.
     */
    public static Bitmap createViewBitmap(View view, Matrix matrix, RectF bounds) {
        if (!view.isAttachedToWindow()) {
            return null;
        }
        Bitmap bitmap = null;
        int bitmapWidth = Math.round(bounds.width());
        int bitmapHeight = Math.round(bounds.height());