From bcd65e85f4720292ba3e30169b9814875fd0a1ab Mon Sep 17 00:00:00 2001 From: Brandon Dayauon Date: Thu, 17 Nov 2022 14:37:40 -0800 Subject: [PATCH] Fix pause work apps button being higher than normal This issue can be repro'd by typing something in toast box, hightlighting text, share, then back gesturing back to allApps work tab. To fix, we can simply reset the translation when updating the visibility of the button by calling onApplyWindowInsets() in updateVisibility() bug: 259004115 test: Photos Before: https://screenshot.googleplex.com/6JbHbK3rfdXiXM4 after: https://screenshot.googleplex.com/B99SLsFcPYf6jrG Change-Id: I2d44de37666d5342457c6ae14c691eb1804043cd --- src/com/android/launcher3/allapps/WorkModeSwitch.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/android/launcher3/allapps/WorkModeSwitch.java b/src/com/android/launcher3/allapps/WorkModeSwitch.java index 0a938b219f..2272cdc3ef 100644 --- a/src/com/android/launcher3/allapps/WorkModeSwitch.java +++ b/src/com/android/launcher3/allapps/WorkModeSwitch.java @@ -154,6 +154,7 @@ public class WorkModeSwitch extends Button implements Insettable, View.OnClickLi private void updateVisibility() { clearAnimation(); + onApplyWindowInsets(getRootWindowInsets()); if (mWorkEnabled && mOnWorkTab) { setFlag(FLAG_FADE_ONGOING); setVisibility(VISIBLE);