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
diff --git a/src/com/android/launcher3/allapps/WorkProfileManager.java b/src/com/android/launcher3/allapps/WorkProfileManager.java
index b70cb13..e2fa9f1 100644
--- a/src/com/android/launcher3/allapps/WorkProfileManager.java
+++ b/src/com/android/launcher3/allapps/WorkProfileManager.java
@@ -155,7 +155,12 @@
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;