From 6fe89eafa400fd0f42d97dcc3a5a2d11cd784c21 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Tue, 15 Feb 2022 06:39:47 +0000 Subject: [PATCH] Fix issue with two back buttons showing during SUW - We should also hide the back button when the IME is showing during SUW Bug: 205803355 Test: Enter SUW, show IME and verify we hide it Change-Id: I79b8061f01754e79508d82cdd265a97f218b13cc --- .../launcher3/taskbar/NavbarButtonsViewController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java index 7ab59b8d9b..e13fcf27f9 100644 --- a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java @@ -237,6 +237,12 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT & Configuration.UI_MODE_NIGHT_MASK; boolean isDarkTheme = mode == Configuration.UI_MODE_NIGHT_YES; mTaskbarNavButtonDarkIntensity.updateValue(isDarkTheme ? 0 : 1); + + if (mIsImeRenderingNavButtons) { + // Hide the back button while the IME is visible during SUW + mPropertyHolders.add(new StatePropertyHolder(mBackButton, + flags -> (flags & FLAG_IME_VISIBLE) == 0)); + } } else if (isInKidsMode) { int iconSize = mContext.getResources().getDimensionPixelSize( R.dimen.taskbar_icon_size_kids);