Hide nav handle/background when taskbar is showing

Test: nav handle isn't showing unless taskbar is hidden or removed
Fixes: 181206743
Bug: 171917176
Change-Id: I84b7d0bba1a5d208b1f8b1b467faf79f04078348
This commit is contained in:
Tony Wickham
2021-03-12 16:06:52 -08:00
parent af0d09b98b
commit 2debd80f1f
2 changed files with 14 additions and 2 deletions

View File

@@ -65,6 +65,7 @@ public class TaskbarVisibilityController {
}
protected void cleanup() {
setNavBarButtonAlpha(1f);
}
protected AnimatedFloat getTaskbarVisibilityForLauncherState() {
@@ -93,6 +94,14 @@ public class TaskbarVisibilityController {
float alphaDueToLauncher = Math.max(mTaskbarBackgroundAlpha.value,
mTaskbarVisibilityAlphaForLauncherState.value);
float alphaDueToOther = mTaskbarVisibilityAlphaForIme.value;
mTaskbarCallbacks.updateTaskbarVisibilityAlpha(alphaDueToLauncher * alphaDueToOther);
float taskbarAlpha = alphaDueToLauncher * alphaDueToOther;
mTaskbarCallbacks.updateTaskbarVisibilityAlpha(taskbarAlpha);
// Make the nav bar invisible if taskbar is visible.
setNavBarButtonAlpha(1f - taskbarAlpha);
}
private void setNavBarButtonAlpha(float navBarAlpha) {
SystemUiProxy.INSTANCE.get(mLauncher).setNavBarButtonAlpha(navBarAlpha, false);
}
}