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

Commit fe1aafe4 authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Prevent crash in View.createSnapshot if getResources() returns null Bug #5260241"

parents b6738fc6 c529d8d8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -10320,7 +10320,10 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
            throw new OutOfMemoryError();
        }
        bitmap.setDensity(getResources().getDisplayMetrics().densityDpi);
        Resources resources = getResources();
        if (resources != null) {
            bitmap.setDensity(resources.getDisplayMetrics().densityDpi);
        }
        Canvas canvas;
        if (attachInfo != null) {