Pass IME visibility through sysui state
Bug: 177609214 Test: Manual Change-Id: I8de0119414c6d76ef7a3fd86037d6745836e0079
This commit is contained in:
@@ -92,6 +92,8 @@ public class QuickStepContract {
|
||||
public static final int SYSUI_STATE_ONE_HANDED_ACTIVE = 1 << 16;
|
||||
// Allow system gesture no matter the system bar(s) is visible or not
|
||||
public static final int SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY = 1 << 17;
|
||||
// The IME is showing
|
||||
public static final int SYSUI_STATE_IME_SHOWING = 1 << 18;
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({SYSUI_STATE_SCREEN_PINNING,
|
||||
@@ -111,7 +113,8 @@ public class QuickStepContract {
|
||||
SYSUI_STATE_BUBBLES_EXPANDED,
|
||||
SYSUI_STATE_GLOBAL_ACTIONS_SHOWING,
|
||||
SYSUI_STATE_ONE_HANDED_ACTIVE,
|
||||
SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY
|
||||
SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY,
|
||||
SYSUI_STATE_IME_SHOWING
|
||||
})
|
||||
public @interface SystemUiStateFlags {}
|
||||
|
||||
@@ -138,6 +141,7 @@ public class QuickStepContract {
|
||||
str.add((flags & SYSUI_STATE_ONE_HANDED_ACTIVE) != 0 ? "one_handed_active" : "");
|
||||
str.add((flags & SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY) != 0
|
||||
? "allow_gesture" : "");
|
||||
str.add((flags & SYSUI_STATE_IME_SHOWING) != 0 ? "ime_visible" : "");
|
||||
return str.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.NAV_BA
|
||||
import static com.android.systemui.recents.OverviewProxyService.OverviewProxyListener;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_CLICKABLE;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SHOWING;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NAV_BAR_HIDDEN;
|
||||
import static com.android.systemui.statusbar.phone.BarTransitions.MODE_LIGHTS_OUT;
|
||||
import static com.android.systemui.statusbar.phone.BarTransitions.MODE_LIGHTS_OUT_TRANSPARENT;
|
||||
@@ -817,6 +818,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener,
|
||||
mNavigationBarView.setNavigationIconHints(hints);
|
||||
}
|
||||
checkBarModes();
|
||||
updateSystemUiStateFlags(-1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1315,6 +1317,8 @@ public class NavigationBar implements View.OnAttachStateChangeListener,
|
||||
mSysUiFlagsContainer.setFlag(SYSUI_STATE_A11Y_BUTTON_CLICKABLE, clickable)
|
||||
.setFlag(SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE, longClickable)
|
||||
.setFlag(SYSUI_STATE_NAV_BAR_HIDDEN, !isNavBarWindowVisible())
|
||||
.setFlag(SYSUI_STATE_IME_SHOWING,
|
||||
(mNavigationIconHints & NAVIGATION_HINT_BACK_ALT) != 0)
|
||||
.commitUpdate(mDisplayId);
|
||||
registerAction(clickable, SystemActions.SYSTEM_ACTION_ID_ACCESSIBILITY_BUTTON);
|
||||
registerAction(longClickable, SystemActions.SYSTEM_ACTION_ID_ACCESSIBILITY_BUTTON_CHOOSER);
|
||||
|
||||
Reference in New Issue
Block a user