Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5038d35 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Hide soft-keyboard when no editor is focused"

parents 057926d3 a201f212
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2160,10 +2160,15 @@ package android.provider {
    field public static final String NAMESPACE_APP_COMPAT_OVERRIDES = "app_compat_overrides";
    field public static final String NAMESPACE_CONSTRAIN_DISPLAY_APIS = "constrain_display_apis";
    field public static final String NAMESPACE_DEVICE_IDLE = "device_idle";
    field public static final String NAMESPACE_INPUT_METHOD_MANAGER = "input_method_manager";
    field public static final String NAMESPACE_JOB_SCHEDULER = "jobscheduler";
    field public static final String NAMESPACE_SELECTION_TOOLBAR = "selection_toolbar";
  }

  public interface InputMethodManagerDeviceConfig {
    field public static final String KEY_HIDE_IME_WHEN_NO_EDITOR_FOCUS = "hide_ime_when_no_editor_focus";
  }

  public final class Settings {
    field public static final int RESET_MODE_PACKAGE_DEFAULTS = 1; // 0x1
  }
+8 −0
Original line number Diff line number Diff line
@@ -775,6 +775,14 @@ public final class DeviceConfig {
     */
    public static final String NAMESPACE_WEAR = "wear";

    /**
     * Namespace for the input method manager platform features.
     *
     * @hide
     */
    @TestApi
    public static final String NAMESPACE_INPUT_METHOD_MANAGER = "input_method_manager";

    private static final Object sLock = new Object();
    @GuardedBy("sLock")
    private static ArrayMap<OnPropertiesChangedListener, Pair<String, Executor>> sListeners =
+31 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.provider;

import android.annotation.TestApi;

/**
 * Interface for accessing keys belonging to {@link DeviceConfig#NAMESPACE_INPUT_METHOD_MANAGER}.
 * @hide
 */
@TestApi
public interface InputMethodManagerDeviceConfig {
    /**
     * Whether the IME should be hidden when the window gained focus without an editor focused.
     */
    String KEY_HIDE_IME_WHEN_NO_EDITOR_FOCUS = "hide_ime_when_no_editor_focus";
}
+2 −0
Original line number Diff line number Diff line
@@ -254,6 +254,8 @@ public final class InputMethodDebug {
                return "HIDE_SOFT_INPUT_EXTRACT_INPUT_CHANGED";
            case SoftInputShowHideReason.HIDE_SOFT_INPUT_IMM_DEPRECATION:
                return "HIDE_SOFT_INPUT_IMM_DEPRECATION";
            case SoftInputShowHideReason.HIDE_WINDOW_GAINED_FOCUS_WITHOUT_EDITOR:
                return "HIDE_WINDOW_GAINED_FOCUS_WITHOUT_EDITOR";
            default:
                return "Unknown=" + reason;
        }
+7 −1
Original line number Diff line number Diff line
@@ -63,7 +63,8 @@ import java.lang.annotation.Retention;
        SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_BACK_KEY,
        SoftInputShowHideReason.HIDE_SOFT_INPUT_IME_TOGGLE_SOFT_INPUT,
        SoftInputShowHideReason.HIDE_SOFT_INPUT_EXTRACT_INPUT_CHANGED,
        SoftInputShowHideReason.HIDE_SOFT_INPUT_IMM_DEPRECATION})
        SoftInputShowHideReason.HIDE_SOFT_INPUT_IMM_DEPRECATION,
        SoftInputShowHideReason.HIDE_WINDOW_GAINED_FOCUS_WITHOUT_EDITOR})
public @interface SoftInputShowHideReason {
    /** Show soft input by {@link android.view.inputmethod.InputMethodManager#showSoftInput}. */
    int SHOW_SOFT_INPUT = 0;
@@ -247,4 +248,9 @@ public @interface SoftInputShowHideReason {
     * {@link InputMethodManager#hideSoftInputFromInputMethod(IBinder, int)}.
     */
    int HIDE_SOFT_INPUT_IMM_DEPRECATION = 31;

    /**
     * Hide soft input when the window gained focus without an editor from the IME shown window.
     */
    int HIDE_WINDOW_GAINED_FOCUS_WITHOUT_EDITOR = 32;
}
Loading