Loading core/java/android/content/pm/ActivityInfo.java +1 −0 Original line number Diff line number Diff line Loading @@ -824,6 +824,7 @@ public class ActivityInfo extends ComponentInfo * WindowManager.LayoutParams.softInputMode}. If 0 (unspecified), * the mode from the theme will be used. */ @android.view.WindowManager.LayoutParams.SoftInputModeFlags public int softInputMode; /** Loading core/java/android/view/ViewRootImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ import android.util.TypedValue; import android.view.Surface.OutOfResourcesException; import android.view.View.AttachInfo; import android.view.View.MeasureSpec; import android.view.WindowManager.LayoutParams.SoftInputModeFlags; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener; Loading Loading @@ -334,6 +335,7 @@ public final class ViewRootImpl implements ViewParent, final Configuration mPendingConfiguration = new Configuration(); boolean mScrollMayChange; @SoftInputModeFlags int mSoftInputMode; WeakReference<View> mLastScrolledFocus; int mScrollY; Loading core/java/android/view/WindowManager.java +29 −5 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.view; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.SystemApi; import android.app.KeyguardManager; Loading @@ -30,6 +31,8 @@ import android.os.Parcelable; import android.text.TextUtils; import android.util.Log; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.List; import java.util.Objects; Loading Loading @@ -1539,6 +1542,27 @@ public interface WindowManager extends ViewManager { */ public static final int SOFT_INPUT_IS_FORWARD_NAVIGATION = 0x100; /** * An internal annotation for flags that can be specified to {@link #softInputMode}. * * @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(flag = true, value = { SOFT_INPUT_STATE_UNSPECIFIED, SOFT_INPUT_STATE_UNCHANGED, SOFT_INPUT_STATE_HIDDEN, SOFT_INPUT_STATE_ALWAYS_HIDDEN, SOFT_INPUT_STATE_VISIBLE, SOFT_INPUT_STATE_ALWAYS_VISIBLE, SOFT_INPUT_ADJUST_UNSPECIFIED, SOFT_INPUT_ADJUST_RESIZE, SOFT_INPUT_ADJUST_PAN, SOFT_INPUT_ADJUST_NOTHING, SOFT_INPUT_IS_FORWARD_NAVIGATION, }) public @interface SoftInputModeFlags {} /** * Desired operating mode for any soft input area. May be any combination * of: Loading @@ -1546,18 +1570,18 @@ public interface WindowManager extends ViewManager { * <ul> * <li> One of the visibility states * {@link #SOFT_INPUT_STATE_UNSPECIFIED}, {@link #SOFT_INPUT_STATE_UNCHANGED}, * {@link #SOFT_INPUT_STATE_HIDDEN}, {@link #SOFT_INPUT_STATE_ALWAYS_VISIBLE}, or * {@link #SOFT_INPUT_STATE_VISIBLE}. * {@link #SOFT_INPUT_STATE_HIDDEN}, {@link #SOFT_INPUT_STATE_ALWAYS_HIDDEN}, * {@link #SOFT_INPUT_STATE_VISIBLE}, or {@link #SOFT_INPUT_STATE_ALWAYS_VISIBLE}. * <li> One of the adjustment options * {@link #SOFT_INPUT_ADJUST_UNSPECIFIED}, * {@link #SOFT_INPUT_ADJUST_RESIZE}, or * {@link #SOFT_INPUT_ADJUST_PAN}. * {@link #SOFT_INPUT_ADJUST_UNSPECIFIED}, {@link #SOFT_INPUT_ADJUST_RESIZE}, * {@link #SOFT_INPUT_ADJUST_PAN}, or {@link #SOFT_INPUT_ADJUST_NOTHING}. * </ul> * * * <p>This flag can be controlled in your theme through the * {@link android.R.attr#windowSoftInputMode} attribute.</p> */ @SoftInputModeFlags public int softInputMode; /** Loading core/java/android/view/inputmethod/InputMethodManager.java +3 −2 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import android.view.InputEventSender; import android.view.KeyEvent; import android.view.View; import android.view.ViewRootImpl; import android.view.WindowManager.LayoutParams.SoftInputModeFlags; import com.android.internal.inputmethod.IInputContentUriToken; import com.android.internal.os.SomeArgs; Loading Loading @@ -1490,8 +1491,8 @@ public final class InputMethodManager { * Called by ViewAncestor when its window gets input focus. * @hide */ public void onPostWindowFocus(View rootView, View focusedView, int softInputMode, boolean first, int windowFlags) { public void onPostWindowFocus(View rootView, View focusedView, @SoftInputModeFlags int softInputMode, boolean first, int windowFlags) { boolean forceNewFocus = false; synchronized (mH) { if (DEBUG) Log.v(TAG, "onWindowFocus: " + focusedView Loading core/java/android/widget/PopupWindow.java +4 −1 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ import android.view.ViewTreeObserver.OnGlobalLayoutListener; import android.view.ViewTreeObserver.OnScrollChangedListener; import android.view.WindowManager; import android.view.WindowManager.LayoutParams; import android.view.WindowManager.LayoutParams.SoftInputModeFlags; import com.android.internal.R; Loading Loading @@ -162,6 +163,7 @@ public class PopupWindow { private boolean mFocusable; private int mInputMethodMode = INPUT_METHOD_FROM_FOCUSABLE; @SoftInputModeFlags private int mSoftInputMode = WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED; private boolean mTouchable = true; private boolean mOutsideTouchable = false; Loading Loading @@ -724,7 +726,7 @@ public class PopupWindow { * @see android.view.WindowManager.LayoutParams#softInputMode * @see #getSoftInputMode() */ public void setSoftInputMode(int mode) { public void setSoftInputMode(@SoftInputModeFlags int mode) { mSoftInputMode = mode; } Loading @@ -734,6 +736,7 @@ public class PopupWindow { * @see #setSoftInputMode(int) * @see android.view.WindowManager.LayoutParams#softInputMode */ @SoftInputModeFlags public int getSoftInputMode() { return mSoftInputMode; } Loading Loading
core/java/android/content/pm/ActivityInfo.java +1 −0 Original line number Diff line number Diff line Loading @@ -824,6 +824,7 @@ public class ActivityInfo extends ComponentInfo * WindowManager.LayoutParams.softInputMode}. If 0 (unspecified), * the mode from the theme will be used. */ @android.view.WindowManager.LayoutParams.SoftInputModeFlags public int softInputMode; /** Loading
core/java/android/view/ViewRootImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ import android.util.TypedValue; import android.view.Surface.OutOfResourcesException; import android.view.View.AttachInfo; import android.view.View.MeasureSpec; import android.view.WindowManager.LayoutParams.SoftInputModeFlags; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener; Loading Loading @@ -334,6 +335,7 @@ public final class ViewRootImpl implements ViewParent, final Configuration mPendingConfiguration = new Configuration(); boolean mScrollMayChange; @SoftInputModeFlags int mSoftInputMode; WeakReference<View> mLastScrolledFocus; int mScrollY; Loading
core/java/android/view/WindowManager.java +29 −5 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.view; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.SystemApi; import android.app.KeyguardManager; Loading @@ -30,6 +31,8 @@ import android.os.Parcelable; import android.text.TextUtils; import android.util.Log; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.List; import java.util.Objects; Loading Loading @@ -1539,6 +1542,27 @@ public interface WindowManager extends ViewManager { */ public static final int SOFT_INPUT_IS_FORWARD_NAVIGATION = 0x100; /** * An internal annotation for flags that can be specified to {@link #softInputMode}. * * @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(flag = true, value = { SOFT_INPUT_STATE_UNSPECIFIED, SOFT_INPUT_STATE_UNCHANGED, SOFT_INPUT_STATE_HIDDEN, SOFT_INPUT_STATE_ALWAYS_HIDDEN, SOFT_INPUT_STATE_VISIBLE, SOFT_INPUT_STATE_ALWAYS_VISIBLE, SOFT_INPUT_ADJUST_UNSPECIFIED, SOFT_INPUT_ADJUST_RESIZE, SOFT_INPUT_ADJUST_PAN, SOFT_INPUT_ADJUST_NOTHING, SOFT_INPUT_IS_FORWARD_NAVIGATION, }) public @interface SoftInputModeFlags {} /** * Desired operating mode for any soft input area. May be any combination * of: Loading @@ -1546,18 +1570,18 @@ public interface WindowManager extends ViewManager { * <ul> * <li> One of the visibility states * {@link #SOFT_INPUT_STATE_UNSPECIFIED}, {@link #SOFT_INPUT_STATE_UNCHANGED}, * {@link #SOFT_INPUT_STATE_HIDDEN}, {@link #SOFT_INPUT_STATE_ALWAYS_VISIBLE}, or * {@link #SOFT_INPUT_STATE_VISIBLE}. * {@link #SOFT_INPUT_STATE_HIDDEN}, {@link #SOFT_INPUT_STATE_ALWAYS_HIDDEN}, * {@link #SOFT_INPUT_STATE_VISIBLE}, or {@link #SOFT_INPUT_STATE_ALWAYS_VISIBLE}. * <li> One of the adjustment options * {@link #SOFT_INPUT_ADJUST_UNSPECIFIED}, * {@link #SOFT_INPUT_ADJUST_RESIZE}, or * {@link #SOFT_INPUT_ADJUST_PAN}. * {@link #SOFT_INPUT_ADJUST_UNSPECIFIED}, {@link #SOFT_INPUT_ADJUST_RESIZE}, * {@link #SOFT_INPUT_ADJUST_PAN}, or {@link #SOFT_INPUT_ADJUST_NOTHING}. * </ul> * * * <p>This flag can be controlled in your theme through the * {@link android.R.attr#windowSoftInputMode} attribute.</p> */ @SoftInputModeFlags public int softInputMode; /** Loading
core/java/android/view/inputmethod/InputMethodManager.java +3 −2 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import android.view.InputEventSender; import android.view.KeyEvent; import android.view.View; import android.view.ViewRootImpl; import android.view.WindowManager.LayoutParams.SoftInputModeFlags; import com.android.internal.inputmethod.IInputContentUriToken; import com.android.internal.os.SomeArgs; Loading Loading @@ -1490,8 +1491,8 @@ public final class InputMethodManager { * Called by ViewAncestor when its window gets input focus. * @hide */ public void onPostWindowFocus(View rootView, View focusedView, int softInputMode, boolean first, int windowFlags) { public void onPostWindowFocus(View rootView, View focusedView, @SoftInputModeFlags int softInputMode, boolean first, int windowFlags) { boolean forceNewFocus = false; synchronized (mH) { if (DEBUG) Log.v(TAG, "onWindowFocus: " + focusedView Loading
core/java/android/widget/PopupWindow.java +4 −1 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ import android.view.ViewTreeObserver.OnGlobalLayoutListener; import android.view.ViewTreeObserver.OnScrollChangedListener; import android.view.WindowManager; import android.view.WindowManager.LayoutParams; import android.view.WindowManager.LayoutParams.SoftInputModeFlags; import com.android.internal.R; Loading Loading @@ -162,6 +163,7 @@ public class PopupWindow { private boolean mFocusable; private int mInputMethodMode = INPUT_METHOD_FROM_FOCUSABLE; @SoftInputModeFlags private int mSoftInputMode = WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED; private boolean mTouchable = true; private boolean mOutsideTouchable = false; Loading Loading @@ -724,7 +726,7 @@ public class PopupWindow { * @see android.view.WindowManager.LayoutParams#softInputMode * @see #getSoftInputMode() */ public void setSoftInputMode(int mode) { public void setSoftInputMode(@SoftInputModeFlags int mode) { mSoftInputMode = mode; } Loading @@ -734,6 +736,7 @@ public class PopupWindow { * @see #setSoftInputMode(int) * @see android.view.WindowManager.LayoutParams#softInputMode */ @SoftInputModeFlags public int getSoftInputMode() { return mSoftInputMode; } Loading