Merge "Increases the minimized width in landscape by statusbar height" into oc-dev
diff --git a/core/java/com/android/internal/policy/DividerSnapAlgorithm.java b/core/java/com/android/internal/policy/DividerSnapAlgorithm.java
index 11e7102..fb6b8b0 100644
--- a/core/java/com/android/internal/policy/DividerSnapAlgorithm.java
+++ b/core/java/com/android/internal/policy/DividerSnapAlgorithm.java
@@ -332,8 +332,12 @@
}
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));
}