From 65590cb071d04b3d5384e9bb5bc10d9cd0d30fe2 Mon Sep 17 00:00:00 2001 From: Brandon Dayauon Date: Wed, 8 Jun 2022 08:31:59 -0700 Subject: [PATCH] Fix work toggle button that gets blocked by threeButton nav bar on TABLETS Ex) for tablets.. the nav bar height is really the height of the taskbar. Thats why we add the current padding of the work toggle button to the taskbar size. As of patchset 3.. I reverted mDevice.getInsets().bottom because it caused the button to be higher than it should be on landscape. Bug: 235053326 Test: Manual (pictures in bug thread) Change-Id: I2f77d759ae060311d049182e8347dede590cd0b0 --- src/com/android/launcher3/allapps/WorkProfileManager.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/allapps/WorkProfileManager.java b/src/com/android/launcher3/allapps/WorkProfileManager.java index b70cb13b07..e2fa9f143f 100644 --- a/src/com/android/launcher3/allapps/WorkProfileManager.java +++ b/src/com/android/launcher3/allapps/WorkProfileManager.java @@ -155,7 +155,12 @@ public class WorkProfileManager implements PersonalWorkSlidingTabStrip.OnActiveP mWorkModeSwitch.getResources().getDimensionPixelSize(R.dimen.qsb_widget_height); } if (!mAllApps.mActivityContext.getDeviceProfile().isGestureMode){ - workFabMarginBottom += mAllApps.mActivityContext.getDeviceProfile().getInsets().bottom; + if (mDeviceProfile.isTaskbarPresent){ + workFabMarginBottom += mDeviceProfile.taskbarSize; + } else { + workFabMarginBottom += + mAllApps.mActivityContext.getDeviceProfile().getInsets().bottom; + } } lp.bottomMargin = workFabMarginBottom; int totalScreenWidth = mDeviceProfile.widthPx;