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

Commit 17e4bed2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixes seascape recents task centering for low ram devices" into oc-mr1-dev

parents 7560cdfb 3a5ec52a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -959,8 +959,8 @@ public class RecentsView extends FrameLayout {
        int left, top;
        if (Recents.getConfiguration().isLowRamDevice) {
            Rect windowRect = Recents.getSystemServices().getWindowRect();
            left = (windowRect.width() - mSystemInsets.left - mSystemInsets.right
                    - mStackActionButton.getMeasuredWidth()) / 2;
            int spaceLeft = windowRect.width() - mSystemInsets.left - mSystemInsets.right;
            left = (spaceLeft - mStackActionButton.getMeasuredWidth()) / 2 + mSystemInsets.left;
            top = windowRect.height() - (mStackActionButton.getMeasuredHeight()
                    + mSystemInsets.bottom + mStackActionButton.getPaddingBottom() / 2);
        } else {
+1 −2
Original line number Diff line number Diff line
@@ -126,7 +126,6 @@ public class TaskStackLowRamLayoutAlgorithm {
            return transformOut;
        }
        boolean visible = true;
        int x = mPaddingLeftRight;
        int y;
        if (taskCount > 1) {
            y = getTaskTopFromIndex(taskIndex) - percentageToScroll(stackScroll);
@@ -255,7 +254,7 @@ public class TaskStackLowRamLayoutAlgorithm {
        transformOut.dimAlpha = 0f;
        transformOut.viewOutlineAlpha = 1f;
        transformOut.rect.set(getTaskRect());
        transformOut.rect.offset(mPaddingLeftRight, y);
        transformOut.rect.offset(mPaddingLeftRight + mSystemInsets.left, y);
        Utilities.scaleRectAboutCenter(transformOut.rect, transformOut.scale);
        transformOut.visible = visible;
    }