From 0e461d80aa94ce1892ef0318f4e7e923b0573c68 Mon Sep 17 00:00:00 2001 From: Matthew Ng Date: Thu, 3 May 2018 16:10:55 -0700 Subject: [PATCH] Correct insets for getNonMinimizedSplitScreenSecondaryBounds Fixed the addition error on seascape and added top insets for launcher to get correct bounds. Change-Id: I963e69dcba7b20d138ba01e361f21186b773a264 Fixes: 79209096 Test: manual --- .../com/android/systemui/stackdivider/DividerView.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java index 79fea9fa4228a..c8ee873571271 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java +++ b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java @@ -376,15 +376,15 @@ public class DividerView extends FrameLayout implements OnTouchListener, public Rect getNonMinimizedSplitScreenSecondaryBounds() { calculateBoundsForPosition(mSnapTargetBeforeMinimized.position, DockedDividerUtils.invertDockSide(mDockSide), mOtherTaskRect); + mOtherTaskRect.bottom -= mStableInsets.bottom; switch (mDockSide) { case WindowManager.DOCKED_LEFT: + mOtherTaskRect.top += mStableInsets.top; mOtherTaskRect.right -= mStableInsets.right; break; case WindowManager.DOCKED_RIGHT: - mOtherTaskRect.left -= mStableInsets.left; - break; - case WindowManager.DOCKED_TOP: - mOtherTaskRect.bottom -= mStableInsets.bottom; + mOtherTaskRect.top += mStableInsets.top; + mOtherTaskRect.left += mStableInsets.left; break; } return mOtherTaskRect;