summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Matthew Ng <ngmatthew@google.com> 2017-09-08 02:31:28 +0000
committer android-build-merger <android-build-merger@google.com> 2017-09-08 02:31:28 +0000
commit19e83f3983d76b35b5116b2bbd867d3160f7f7b2 (patch)
tree80d74674004edd32aa37648b6c7c951ec9bb4740
parent17367274cbd7eca3f5e8f5fd8fb57ea0d9bab913 (diff)
parent17e4bed28fc97845296668d0e7a75417f5a08567 (diff)
Merge "Fixes seascape recents task centering for low ram devices" into oc-mr1-dev
am: 17e4bed28f Change-Id: I8e768a5603a1db53be705bcb5c247586f04de249
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/lowram/TaskStackLowRamLayoutAlgorithm.java3
2 files changed, 3 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
index 09e712cc0ebc..c44cd7287625 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
@@ -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 {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/lowram/TaskStackLowRamLayoutAlgorithm.java b/packages/SystemUI/src/com/android/systemui/recents/views/lowram/TaskStackLowRamLayoutAlgorithm.java
index 52fa7b5c7186..17e6b9e3c195 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/lowram/TaskStackLowRamLayoutAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/lowram/TaskStackLowRamLayoutAlgorithm.java
@@ -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;
}