From b7e4b7c279479dbb52868adc09e3925ff63ca78b Mon Sep 17 00:00:00 2001 From: Ming-Shin Lu Date: Tue, 27 Apr 2021 22:46:55 +0800 Subject: [PATCH] Add debug log for showSoftInput As CL[1] added the reason field in showSoftInput to expose where the show request comes from. Refine the original showSoftInput debug log from CL[2] to add the reason for helping the issue clarification. [1]: I390dc029e7bcc30c200926a9bfbbbd0268a1f714 [2]: I67a790f9d98d6131aaf04e4bb98d2a28873d3424 Bug: 182071625 Bug: 171827834 Test: adb logcat -s InputMethodManager:D Change-Id: I73ab4e2b856669b6b6922ee451da1819e5ca18f4 --- core/java/android/view/inputmethod/InputMethodManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index b5d6a5eca227d..e85f878ce7a23 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -1696,7 +1696,8 @@ public final class InputMethodManager { } try { - Log.d(TAG, "showSoftInput() view=" + view + " flags=" + flags); + Log.d(TAG, "showSoftInput() view=" + view + " flags=" + flags + " reason=" + + InputMethodDebug.softInputDisplayReasonToString(reason)); final Completable.Boolean value = Completable.createBoolean(); mService.showSoftInput( mClient,