Merge "Add WINDOW_GAINED_FOCUS to IntDef annotation"

This commit is contained in:
Nikolas Havrikov
2021-11-11 08:27:55 +00:00
committed by Android (Google) Code Review

View File

@@ -30,7 +30,9 @@ import java.lang.annotation.Retention;
@IntDef(flag = true, value = {
StartInputFlags.VIEW_HAS_FOCUS,
StartInputFlags.IS_TEXT_EDITOR,
StartInputFlags.INITIAL_CONNECTION})
StartInputFlags.INITIAL_CONNECTION,
StartInputFlags.WINDOW_GAINED_FOCUS,
})
public @interface StartInputFlags {
/**
* There is a focused view in the focused window.
@@ -40,17 +42,17 @@ public @interface StartInputFlags {
/**
* The focused view is a text editor.
*/
int IS_TEXT_EDITOR = 2;
int IS_TEXT_EDITOR = 1 << 1;
/**
* An internal concept to distinguish "start" and "restart". This concept doesn't look well
* documented hence we probably need to revisit this though.
*/
int INITIAL_CONNECTION = 4;
int INITIAL_CONNECTION = 1 << 2;
/**
* The start input happens when the window gained focus to call
* {@code android.view.inputmethod.InputMethodManager#startInputAsyncOnWindowFocusGain}.
*/
int WINDOW_GAINED_FOCUS = 8;
int WINDOW_GAINED_FOCUS = 1 << 3;
}