OSDN Git Service

Fixing issue with gap between task views.
authorWinson <winsonc@google.com>
Sat, 16 Apr 2016 00:54:52 +0000 (17:54 -0700)
committerWinson <winsonc@google.com>
Tue, 19 Apr 2016 01:20:27 +0000 (18:20 -0700)
- Now that we changed the way the landscape tasks clipped, we no longer
  have to worry about the aspect ratio scaled height.

Bug: 27921659
Change-Id: I86b10805e92decb9995caa3790649f9f7d211784

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

index 57c2bc0..ee3a9b9 100644 (file)
@@ -454,11 +454,8 @@ public class TaskStackLayoutAlgorithm {
         mStackActionButtonRect.set(mStackRect.left, mStackRect.top - topMargin,
                 mStackRect.right, mStackRect.top + mFocusedTopPeekHeight);
 
-        // Anchor the task rect top aligned to the non-freeform stack rect
-        float aspect = (float) (windowRect.width() - (mSystemInsets.left + mSystemInsets.right)) /
-                (windowRect.height() - (mSystemInsets.top + mSystemInsets.bottom));
-        int minHeight = mStackRect.height() - mInitialTopOffset - mStackBottomOffset;
-        int height = (int) Math.min(mStackRect.width() / aspect, minHeight);
+        // Anchor the task rect top aligned to the stack rect
+        int height = mStackRect.height() - mInitialTopOffset - mStackBottomOffset;
         mTaskRect.set(mStackRect.left, mStackRect.top, mStackRect.right, mStackRect.top + height);
 
         // Short circuit here if the stack rects haven't changed so we don't do all the work below