Show IME switcher only when physical keyboard is connected in 3 button nav (instead of also when virtual keyboard is visible)

Bug: 226489759
Test: connect to a physical keyboard in 3 button nav and make sure the ime switcher shows; and doesn't show with virtual keyboard
Change-Id: Ib9a5880eb1bd6d5b877a9f3789ce858f399c4910
This commit is contained in:
Tracy Zhou
2022-06-24 23:37:01 -07:00
parent 804feb76e7
commit 849a0c4e81
3 changed files with 20 additions and 4 deletions

View File

@@ -68,7 +68,8 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
public static final int ALPHA_INDEX_RECENTS_DISABLED = 3;
public static final int ALPHA_INDEX_NOTIFICATION_EXPANDED = 4;
public static final int ALPHA_INDEX_ASSISTANT_INVOKED = 5;
private static final int NUM_ALPHA_CHANNELS = 6;
public static final int ALPHA_INDEX_IME_BUTTON_NAV = 6;
private static final int NUM_ALPHA_CHANNELS = 7;
private final TaskbarActivityContext mActivity;
private final TaskbarView mTaskbarView;
@@ -142,6 +143,14 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
mTaskbarView.setTouchesEnabled(!isImeVisible);
}
/**
* Should be called when the IME switcher visibility changes.
*/
public void setIsImeSwitcherVisible(boolean isImeSwitcherVisible) {
mTaskbarIconAlpha.getProperty(ALPHA_INDEX_IME_BUTTON_NAV).setValue(
isImeSwitcherVisible ? 0 : 1);
}
/**
* Should be called when the recents button is disabled, so we can hide taskbar icons as well.
*/