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
This commit is contained in:
Matthew Ng
2018-05-03 16:10:55 -07:00
parent e09cde0cd9
commit 0e461d80aa

View File

@@ -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;