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

Commit dec4430d authored by Winson's avatar Winson Committed by Winson Chung
Browse files

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
parent 1722613b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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());
+3 −2
Original line number Diff line number Diff line
@@ -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;
    }