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

Commit 6598b2d0 authored by Sid Soundararajan's avatar Sid Soundararajan
Browse files

Add a null check to prevent NPE

Rare case where the rect returned from a View is null.

BUG: 28118236
Change-Id: Ie95b082c92c110f753152a50399c188b19d14e4b
parent 53553d3b
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -121,11 +121,13 @@ public class RecentsTvTransitionHelper {
        }
        try {
            Rect taskRect = taskView.getFocusedThumbnailRect();
            if (taskRect != null) {
                Bitmap thumbnail = Bitmap.createScaledBitmap(task.thumbnail, taskRect.width(),
                        taskRect.height(), false);
                WindowManagerGlobal.getWindowManagerService()
                        .overridePendingAppTransitionAspectScaledThumb(thumbnail, taskRect.left,
                                taskRect.top, taskRect.width(), taskRect.height(), callback, true);
            }
        } catch (RemoteException e) {
            Log.w(TAG, "Failed to override transition: " + e);
        }