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

Commit e87caf2e 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

Change-Id: Ie19e9de91eb3152eff0d92af573e95d1801d939a
parents da958630 701bb5b7
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());