Merge "Fixed overlap issue where toggle button gets overlapped by 3 button nav bar..now button shifts up so it's not totally obscured" into tm-dev am: 32f1e89193
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17652943
Change-Id: I9b82d284f3f5cc3844c43b941c8204e06faac077
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/src/com/android/launcher3/allapps/WorkProfileManager.java b/src/com/android/launcher3/allapps/WorkProfileManager.java
index bcb0d14..6203cea 100644
--- a/src/com/android/launcher3/allapps/WorkProfileManager.java
+++ b/src/com/android/launcher3/allapps/WorkProfileManager.java
@@ -27,6 +27,7 @@
import android.os.UserManager;
import android.util.Log;
import android.view.ViewGroup;
+import android.view.WindowInsets;
import androidx.annotation.IntDef;
import androidx.annotation.Nullable;
@@ -147,6 +148,9 @@
workFabMarginBottom +=
mWorkModeSwitch.getResources().getDimensionPixelSize(R.dimen.qsb_widget_height);
}
+ if (!mAllApps.mActivityContext.getDeviceProfile().isGestureMode){
+ workFabMarginBottom += mAllApps.mActivityContext.getDeviceProfile().getInsets().bottom;
+ }
((ViewGroup.MarginLayoutParams) mWorkModeSwitch.getLayoutParams()).bottomMargin =
workFabMarginBottom;
if (mWorkModeSwitch.getParent() != mAllApps) {
@@ -158,7 +162,6 @@
mWorkModeSwitch.updateCurrentState(mCurrentState == STATE_ENABLED);
return true;
}
-
/**
* Removes work profile toggle button from {@link BaseAllAppsContainerView}
*/