summaryrefslogtreecommitdiffstats
path: root/quickstep/recents_ui_overrides/src/com
diff options
context:
space:
mode:
authorAndy Wickham <awickham@google.com>2019-08-28 14:46:34 -0700
committerAndy Wickham <awickham@google.com>2019-09-03 22:05:20 +0000
commit90c16ace8a305229f42568d6f568a50b326a841b (patch)
tree5a8c982791e43e09e743bea5b7c8526a904cef18 /quickstep/recents_ui_overrides/src/com
parentc40872b913ac657561d4fbfa0289c1f550756588 (diff)
downloadpackages_apps_Trebuchet-90c16ace8a305229f42568d6f568a50b326a841b.tar.gz
packages_apps_Trebuchet-90c16ace8a305229f42568d6f568a50b326a841b.tar.bz2
packages_apps_Trebuchet-90c16ace8a305229f42568d6f568a50b326a841b.zip
Reduces padding of the Overview shelf in no button mode.
Before: https://screenshot.googleplex.com/iw6baTCfoy2.png After: https://screenshot.googleplex.com/8CcsQvLhYDo.png Desired: https://b.corp.google.com/action/issues/139551306/attachments/26925873?download=false Test: Examined before and after padding and verified 3-button is unaffected. Fixes: 139551306 Change-Id: Ia416399cf25e7c6c2fb8aa84ad20e7ad74dcd31b (cherry picked from commit ddc9622e92fb5a4b211a5942ec679d195dc10d19)
Diffstat (limited to 'quickstep/recents_ui_overrides/src/com')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java11
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/QuickstepTestInformationHandler.java2
2 files changed, 9 insertions, 4 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java
index 151ceb834..93d4de17d 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/OverviewState.java
@@ -32,6 +32,7 @@ import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_7;
import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE;
+import android.content.Context;
import android.graphics.Rect;
import android.view.View;
@@ -159,11 +160,15 @@ public class OverviewState extends LauncherState {
}
public static float getDefaultSwipeHeight(Launcher launcher) {
- return getDefaultSwipeHeight(launcher.getDeviceProfile());
+ return getDefaultSwipeHeight(launcher, launcher.getDeviceProfile());
}
- public static float getDefaultSwipeHeight(DeviceProfile dp) {
- return dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx;
+ public static float getDefaultSwipeHeight(Context context, DeviceProfile dp) {
+ float swipeHeight = dp.allAppsCellHeightPx - dp.allAppsIconTextSizePx;
+ if (SysUINavigationMode.getMode(context) == SysUINavigationMode.Mode.NO_BUTTON) {
+ swipeHeight -= dp.getInsets().bottom;
+ }
+ return swipeHeight;
}
@Override
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/QuickstepTestInformationHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/QuickstepTestInformationHandler.java
index 4eb9df2cb..da4642636 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/QuickstepTestInformationHandler.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/QuickstepTestInformationHandler.java
@@ -24,7 +24,7 @@ public class QuickstepTestInformationHandler extends TestInformationHandler {
switch (method) {
case TestProtocol.REQUEST_HOME_TO_OVERVIEW_SWIPE_HEIGHT: {
final float swipeHeight =
- OverviewState.getDefaultSwipeHeight(mDeviceProfile);
+ OverviewState.getDefaultSwipeHeight(mContext, mDeviceProfile);
response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) swipeHeight);
return response;
}