OSDN Git Service

Ensure that the front-most task never dims when scrolling the stack.
authorWinson <winsonc@google.com>
Sat, 9 Jan 2016 00:55:33 +0000 (16:55 -0800)
committerWinson <winsonc@google.com>
Thu, 14 Jan 2016 23:23:34 +0000 (15:23 -0800)
Change-Id: I370311b78203c079c4bbfa67753da13f91a15cbc

packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java

index e908e53..1e3baa6 100644 (file)
@@ -650,7 +650,11 @@ public class TaskStackLayoutAlgorithm {
             y += (mStackRect.top - mTaskRect.top);
             z = Math.max(mMinTranslationZ, Math.min(mMaxTranslationZ,
                     mMinTranslationZ + (p * (mMaxTranslationZ - mMinTranslationZ))));
-            relP = unfocusedP;
+            if (mNumStackTasks == 1) {
+                relP = 1f;
+            } else {
+                relP = Math.min(mMaxScrollP, unfocusedP);
+            }
         }
 
         // Fill out the transform