Loading src/com/android/launcher3/allapps/BaseAllAppsContainerView.java +11 −0 Original line number Diff line number Diff line Loading @@ -799,6 +799,17 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte return mActivityContext.getDeviceProfile().isTablet ? mBottomSheetBackground : this; } /** * Sets whether the view or its children should react to the window inset. * Used for when exiting all apps -> workspace and determines if window inset * should be applied.. ex) the work mode switch. */ public void setApplyWindowInset(boolean shouldApplyWindowInset) { if (mWorkManager.getWorkModeSwitch() != null) { mWorkManager.getWorkModeSwitch().setApplyWindowInset(shouldApplyWindowInset); } } /** Holds a {@link BaseAllAppsAdapter} and related fields. */ public class AdapterHolder { public static final int MAIN = 0; Loading src/com/android/launcher3/allapps/WorkModeSwitch.java +6 −1 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ public class WorkModeSwitch extends Button implements Insettable, View.OnClickLi private int mFlags; private boolean mWorkEnabled; private boolean mOnWorkTab; private boolean mApplyWindowInset; public WorkModeSwitch(Context context) { this(context, null, 0); Loading Loading @@ -168,7 +169,7 @@ public class WorkModeSwitch extends Button implements Insettable, View.OnClickLi @Override public WindowInsets onApplyWindowInsets(WindowInsets insets) { if (!Utilities.ATLEAST_R) { if (!Utilities.ATLEAST_R || !mApplyWindowInset) { return insets; } if (insets.isVisible(WindowInsets.Type.ime())) { Loading Loading @@ -197,4 +198,8 @@ public class WorkModeSwitch extends Button implements Insettable, View.OnClickLi private void removeFlag(int flag) { mFlags &= ~flag; } public void setApplyWindowInset(boolean applyWindowInset){ mApplyWindowInset = applyWindowInset; } } Loading
src/com/android/launcher3/allapps/BaseAllAppsContainerView.java +11 −0 Original line number Diff line number Diff line Loading @@ -799,6 +799,17 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte return mActivityContext.getDeviceProfile().isTablet ? mBottomSheetBackground : this; } /** * Sets whether the view or its children should react to the window inset. * Used for when exiting all apps -> workspace and determines if window inset * should be applied.. ex) the work mode switch. */ public void setApplyWindowInset(boolean shouldApplyWindowInset) { if (mWorkManager.getWorkModeSwitch() != null) { mWorkManager.getWorkModeSwitch().setApplyWindowInset(shouldApplyWindowInset); } } /** Holds a {@link BaseAllAppsAdapter} and related fields. */ public class AdapterHolder { public static final int MAIN = 0; Loading
src/com/android/launcher3/allapps/WorkModeSwitch.java +6 −1 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ public class WorkModeSwitch extends Button implements Insettable, View.OnClickLi private int mFlags; private boolean mWorkEnabled; private boolean mOnWorkTab; private boolean mApplyWindowInset; public WorkModeSwitch(Context context) { this(context, null, 0); Loading Loading @@ -168,7 +169,7 @@ public class WorkModeSwitch extends Button implements Insettable, View.OnClickLi @Override public WindowInsets onApplyWindowInsets(WindowInsets insets) { if (!Utilities.ATLEAST_R) { if (!Utilities.ATLEAST_R || !mApplyWindowInset) { return insets; } if (insets.isVisible(WindowInsets.Type.ime())) { Loading Loading @@ -197,4 +198,8 @@ public class WorkModeSwitch extends Button implements Insettable, View.OnClickLi private void removeFlag(int flag) { mFlags &= ~flag; } public void setApplyWindowInset(boolean applyWindowInset){ mApplyWindowInset = applyWindowInset; } }