summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Winson Chung <winsonc@google.com> 2016-02-16 00:54:16 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-02-16 00:54:17 +0000
commit61ce27d3e968de3a795a7e65448608f8e5286dec (patch)
tree32689ca446a5648ea000b7832a0548e0c8199171
parent9c6d9753a0f1651c639fe8158b86a1f7ffc3f60a (diff)
parentbe8f35747c11e2be642c65b4d387458c373702c4 (diff)
Merge "Fixing issue with front task dimming when scrolled back." into nyc-dev
-rw-r--r--packages/SystemUI/res/values-sw720dp/dimens.xml2
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java17
2 files changed, 13 insertions, 6 deletions
diff --git a/packages/SystemUI/res/values-sw720dp/dimens.xml b/packages/SystemUI/res/values-sw720dp/dimens.xml
index de4a84274ab0..8fe6be93917a 100644
--- a/packages/SystemUI/res/values-sw720dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw720dp/dimens.xml
@@ -32,7 +32,7 @@
<!-- The radius of the rounded corners on a task view. -->
<dimen name="recents_task_view_rounded_corners_radius">3dp</dimen>
<!-- The radius of the rounded corners on a task view's shadow. -->
- <dimen name="recents_task_view_shadow_rounded_corners_radius">18dp</dimen>
+ <dimen name="recents_task_view_shadow_rounded_corners_radius">12dp</dimen>
<!-- The fraction of the screen height where the clock on the Keyguard has its center. The
max value is used when no notifications are displaying, and the min value is when the
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
index 6be42c36f6b7..88bebdbf173b 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
@@ -693,6 +693,11 @@ public class TaskStackLayoutAlgorithm {
SystemServicesProxy ssp = Recents.getSystemServices();
// Compute the focused and unfocused offset
+ float boundedStackScroll = Utilities.clamp(stackScroll, mMinScrollP, mMaxScrollP);
+ mUnfocusedRange.offset(boundedStackScroll);
+ mFocusedRange.offset(boundedStackScroll);
+ float boundedScrollUnfocusedRangeX = mUnfocusedRange.getNormalizedX(taskProgress);
+ float boundedScrollFocusedRangeX = mFocusedRange.getNormalizedX(taskProgress);
mUnfocusedRange.offset(stackScroll);
mFocusedRange.offset(stackScroll);
boolean unfocusedVisible = mUnfocusedRange.isInRange(taskProgress);
@@ -729,15 +734,17 @@ public class TaskStackLayoutAlgorithm {
unfocusedRangeX)) * mStackRect.height());
int focusedY = (int) ((1f - mFocusedCurveInterpolator.getInterpolation(
focusedRangeX)) * mStackRect.height());
- float unfocusedDim = 1f - UNFOCUSED_DIM_INTERPOLATOR.getInterpolation(unfocusedRangeX);
- float focusedDim = 1f - FOCUSED_DIM_INTERPOLATOR.getInterpolation(focusedRangeX);
+ float unfocusedDim = 1f - UNFOCUSED_DIM_INTERPOLATOR.getInterpolation(
+ boundedScrollUnfocusedRangeX);
+ float focusedDim = 1f - FOCUSED_DIM_INTERPOLATOR.getInterpolation(
+ boundedScrollFocusedRangeX);
y = (mStackRect.top - mTaskRect.top) +
(int) Utilities.mapRange(focusState, unfocusedY, focusedY);
- z = Utilities.mapRange(Utilities.clamp01(unfocusedRangeX), mMinTranslationZ,
- mMaxTranslationZ);
+ z = Utilities.mapRange(Utilities.clamp01(boundedScrollUnfocusedRangeX),
+ mMinTranslationZ, mMaxTranslationZ);
dimAlpha = DIM_MAX_VALUE * Utilities.mapRange(focusState, unfocusedDim, focusedDim);
- viewOutlineAlpha = Utilities.mapRange(Utilities.clamp01(unfocusedRangeX),
+ viewOutlineAlpha = Utilities.mapRange(Utilities.clamp01(boundedScrollUnfocusedRangeX),
OUTLINE_ALPHA_MIN_VALUE, OUTLINE_ALPHA_MAX_VALUE);
}