Fix work toggle button to be placed where it should be.

Previously, the implementation used the entire screen width
within it's calculations to determine where the button should be placed.
This is wrong because allApps have it's own container which we should
take the width from. The current implementation works fine because
the width of the screen for phones is the same width as the allApps container
BUT this implemention is WRONG for tablets. With now using the
allApps width for the calculation .. it works for both tablets/phones.

Bug: 235054324
Test: Photos in bug thread
Change-Id: I4c771d310a5d33646ad618e9c241cb5662493747
diff --git a/src/com/android/launcher3/allapps/WorkProfileManager.java b/src/com/android/launcher3/allapps/WorkProfileManager.java
index b70cb13..8443923 100644
--- a/src/com/android/launcher3/allapps/WorkProfileManager.java
+++ b/src/com/android/launcher3/allapps/WorkProfileManager.java
@@ -158,10 +158,10 @@
             workFabMarginBottom += mAllApps.mActivityContext.getDeviceProfile().getInsets().bottom;
         }
         lp.bottomMargin = workFabMarginBottom;
-        int totalScreenWidth = mDeviceProfile.widthPx;
+        int allAppsContainerWidth = mAllApps.getVisibleContainerView().getWidth();
         int personalWorkTabWidth =
                 mAllApps.mActivityContext.getAppsView().getFloatingHeaderView().getTabWidth();
-        lp.rightMargin = lp.leftMargin = (totalScreenWidth - personalWorkTabWidth) / 2;
+        lp.rightMargin = lp.leftMargin = (allAppsContainerWidth - personalWorkTabWidth) / 2;
         if (mWorkModeSwitch.getParent() != mAllApps) {
             mAllApps.addView(mWorkModeSwitch);
         }