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

Commit 1ff15a96 authored by Doris Liu's avatar Doris Liu Committed by android-build-merger
Browse files

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

am: e87caf2e

Change-Id: I3e87ad8958ce0a696593f0d771c492634f6703d4
parents 7f5fc650 e87caf2e
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());