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
This commit is contained in:
Brandon Dayauon
2022-11-17 14:37:40 -08:00
parent 1b30bab1e1
commit bcd65e85f4

View File

@@ -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);