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 {
|
||||
Rect taskRect = taskView.getFocusedThumbnailRect();
|
||||
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);
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user