From 23ff6774b758c559748d91994b989019621dd30d Mon Sep 17 00:00:00 2001 From: Brandon Dayauon Date: Wed, 21 Sep 2022 10:03:47 -0700 Subject: [PATCH] Fix pause work apps overlapping IME The bottom margin for button in gesture navigation is wrong. The bottom margin for the button is supposed to be 20dp from the gesture nav bar, not 20dp from the bottom of the screen. The calculation was correct for 3 button nav but was forgotten to be applied to gesture nav. bug: 246243359 test: Manual - after: https://hsv.googleplex.com/5763335673872384 Change-Id: If678a70b4ad43791cf9e66390164e1ab25a6e366 --- src/com/android/launcher3/allapps/WorkModeSwitch.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/com/android/launcher3/allapps/WorkModeSwitch.java b/src/com/android/launcher3/allapps/WorkModeSwitch.java index a5894484ee..15fb77cfb3 100644 --- a/src/com/android/launcher3/allapps/WorkModeSwitch.java +++ b/src/com/android/launcher3/allapps/WorkModeSwitch.java @@ -97,12 +97,10 @@ public class WorkModeSwitch extends Button implements Insettable, View.OnClickLi bottomMargin += dp.hotseatQsbHeight; } - if (!dp.isGestureMode) { - if (dp.isTaskbarPresent) { - bottomMargin += dp.taskbarSize; - } else { - bottomMargin += insets.bottom; - } + if (!dp.isGestureMode && dp.isTaskbarPresent) { + bottomMargin += dp.taskbarSize; + } else { + bottomMargin += insets.bottom; } lp.bottomMargin = bottomMargin;