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

Commit bf1a98f5 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Adding size check when generating holographic outline

Bug: 24426913
Change-Id: Ic7c9c767ea60ae4b25e064127105d94104233596
parent 8ac727b2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -164,6 +164,9 @@ public class HolographicOutlineHelper {

        int bitmapWidth = (int) (rect.width() * view.getScaleX());
        int bitmapHeight = (int) (rect.height() * view.getScaleY());
        if (bitmapHeight <= 0 || bitmapWidth <= 0) {
            return null;
        }

        int key = (bitmapWidth << 16) | bitmapHeight;
        Bitmap cache = mBitmapCache.get(key);