From 7ccdb52fc98da546bdd565d0757f1fa09522862d Mon Sep 17 00:00:00 2001 From: Matthew Ng Date: Tue, 18 Apr 2017 16:12:59 -0700 Subject: [PATCH] Increases the minimized width in landscape by statusbar height Adds an extra 24dp (statusbar inset height) to the minimized width in landscape and seascape. Change-Id: Ia7b6b665a4ef01e5998d1ada0bbb4db02abb7f97 Fixes: 36529938, 36531002 Test: manual --- .../com/android/internal/policy/DividerSnapAlgorithm.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/java/com/android/internal/policy/DividerSnapAlgorithm.java b/core/java/com/android/internal/policy/DividerSnapAlgorithm.java index 11e71026bf093..fb6b8b0b2e16d 100644 --- a/core/java/com/android/internal/policy/DividerSnapAlgorithm.java +++ b/core/java/com/android/internal/policy/DividerSnapAlgorithm.java @@ -332,8 +332,12 @@ public class DividerSnapAlgorithm { } private void addMinimizedTarget(boolean isHorizontalDivision) { - int position = mTaskHeightInMinimizedMode; - position += isHorizontalDivision ? mInsets.top : mInsets.left; + // In portrait offset the position by the statusbar height, in landscape add the statusbar + // height as well to match portrait offset + int position = mTaskHeightInMinimizedMode + mInsets.top; + if (!isHorizontalDivision) { + position += mInsets.left; + } mTargets.add(new SnapTarget(position, position, SnapTarget.FLAG_NONE)); }