summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorGeorge Zacharia <george.zcharia@gmail.com>2022-12-11 20:20:25 +0300
committerSemavi Ulusoy <doc.divxm@gmail.com>2022-12-15 20:02:27 +0300
commit998f28a8e5fad5d2cb3c779b97e471f1480a33e5 (patch)
tree45e7d172b25e1a27f66182c9c305f26b4532d6b3 /core/java/android/inputmethodservice/InputMethodService.java
parent84cc160548e9af3019df4691fb6ae2f7f12ef8e8 (diff)
parent7556c20276d2b96346fbf30b6631babde90aba0b (diff)
Merge tag 'android-13.0.0_r16' into t13.0
Android 13.0.0 Release 16 (TQ1A.221205.011) Also included the following reverts: 1. Revert "fw/b: Import Wi-Fi standard icon [1/2]" 2. Revert "Add preference for toggling the wallpaper zooming animation" Co-authored-by: Semavi Ulusoy <doc.divxm@gmail.com> Change-Id: I9a6b51e452c28d10411712c59778bb54da5783e9
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index c0f6f2615234..41cac9bdf14f 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -148,6 +148,7 @@ import com.android.internal.inputmethod.ImeTracing;
import com.android.internal.inputmethod.InputMethodNavButtonFlags;
import com.android.internal.inputmethod.InputMethodPrivilegedOperations;
import com.android.internal.inputmethod.InputMethodPrivilegedOperationsRegistry;
+import com.android.internal.inputmethod.SoftInputShowHideReason;
import com.android.internal.util.RingBuffer;
import com.android.internal.view.IInlineSuggestionsRequestCallback;
import com.android.internal.view.IInputContext;
@@ -2975,9 +2976,13 @@ public class InputMethodService extends AbstractInputMethodService {
* @param flags Provides additional operating flags.
*/
public void requestHideSelf(int flags) {
+ requestHideSelf(flags, SoftInputShowHideReason.HIDE_SOFT_INPUT_FROM_IME);
+ }
+
+ private void requestHideSelf(int flags, @SoftInputShowHideReason int reason) {
ImeTracing.getInstance().triggerServiceDump("InputMethodService#requestHideSelf", mDumper,
null /* icProto */);
- mPrivOps.hideMySoftInput(flags);
+ mPrivOps.hideMySoftInput(flags, reason);
}
/**
@@ -2998,7 +3003,9 @@ public class InputMethodService extends AbstractInputMethodService {
if (mShowInputRequested) {
// If the soft input area is shown, back closes it and we
// consume the back key.
- if (doIt) requestHideSelf(0);
+ if (doIt) {
+ requestHideSelf(0 /* flags */, SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_BACK_KEY);
+ }
return true;
} else if (mDecorViewVisible) {
if (mCandidatesVisibility == View.VISIBLE) {
@@ -3169,7 +3176,8 @@ public class InputMethodService extends AbstractInputMethodService {
private void onToggleSoftInput(int showFlags, int hideFlags) {
if (DEBUG) Log.v(TAG, "toggleSoftInput()");
if (isInputViewShown()) {
- requestHideSelf(hideFlags);
+ requestHideSelf(
+ hideFlags, SoftInputShowHideReason.HIDE_SOFT_INPUT_IME_TOGGLE_SOFT_INPUT);
} else {
requestShowSelf(showFlags);
}
@@ -3604,7 +3612,8 @@ public class InputMethodService extends AbstractInputMethodService {
*/
public void onExtractingInputChanged(EditorInfo ei) {
if (ei.inputType == InputType.TYPE_NULL) {
- requestHideSelf(InputMethodManager.HIDE_NOT_ALWAYS);
+ requestHideSelf(InputMethodManager.HIDE_NOT_ALWAYS,
+ SoftInputShowHideReason.HIDE_SOFT_INPUT_EXTRACT_INPUT_CHANGED);
}
}