Always force update the transform when calling from RecentsImpl.
- Workaround for crash in RecentsImpl where we could be retrieving the transform for a task that is not at the front of the stack (can happen if time changes, etc.) However, since we only use the size for the transition, we can always force-update the transform. Bug: 27849282 Change-Id: I86eee4c158748e4f13a2daeac5cf040c0874f967
This commit is contained in:
@@ -794,6 +794,9 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
|
||||
synchronized (mHeaderBarLock) {
|
||||
int toHeaderWidth = (int) toTransform.rect.width();
|
||||
int toHeaderHeight = (int) (mHeaderBar.getMeasuredHeight() * toTransform.scale);
|
||||
if (toHeaderWidth <= 0 || toHeaderHeight <= 0) {
|
||||
return null;
|
||||
}
|
||||
boolean disabledInSafeMode = !toTask.isSystemApp && ssp.isInSafeMode();
|
||||
mHeaderBar.onTaskViewSizeChanged((int) toTransform.rect.width(),
|
||||
(int) toTransform.rect.height());
|
||||
|
||||
@@ -803,8 +803,9 @@ public class TaskStackLayoutAlgorithm {
|
||||
public TaskViewTransform getStackTransformScreenCoordinates(Task task, float stackScroll,
|
||||
TaskViewTransform transformOut, TaskViewTransform frontTransform) {
|
||||
Rect windowRect = Recents.getSystemServices().getWindowRect();
|
||||
TaskViewTransform transform = getStackTransform(task, stackScroll, transformOut,
|
||||
frontTransform);
|
||||
TaskViewTransform transform = getStackTransform(task, stackScroll, mFocusState,
|
||||
transformOut, frontTransform, true /* forceUpdate */,
|
||||
false /* ignoreTaskOverrides */);
|
||||
transform.rect.offset(windowRect.left, windowRect.top);
|
||||
return transform;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user