Merge "Add a null check to prevent NPE" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
996c40906e
@@ -121,11 +121,13 @@ public class RecentsTvTransitionHelper {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
Rect taskRect = taskView.getFocusedThumbnailRect();
|
Rect taskRect = taskView.getFocusedThumbnailRect();
|
||||||
Bitmap thumbnail = Bitmap.createScaledBitmap(task.thumbnail, taskRect.width(),
|
if (taskRect != null) {
|
||||||
taskRect.height(), false);
|
Bitmap thumbnail = Bitmap.createScaledBitmap(task.thumbnail, taskRect.width(),
|
||||||
WindowManagerGlobal.getWindowManagerService()
|
taskRect.height(), false);
|
||||||
.overridePendingAppTransitionAspectScaledThumb(thumbnail, taskRect.left,
|
WindowManagerGlobal.getWindowManagerService()
|
||||||
taskRect.top, taskRect.width(), taskRect.height(), callback, true);
|
.overridePendingAppTransitionAspectScaledThumb(thumbnail, taskRect.left,
|
||||||
|
taskRect.top, taskRect.width(), taskRect.height(), callback, true);
|
||||||
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.w(TAG, "Failed to override transition: " + e);
|
Log.w(TAG, "Failed to override transition: " + e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user