Loading core/java/com/android/internal/inputmethod/InputMethodUtils.java +22 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,28 @@ public class InputMethodUtils { } return sb.toString(); } public static String getApiCallStack() { String apiCallStack = ""; try { throw new RuntimeException(); } catch (RuntimeException e) { final StackTraceElement[] frames = e.getStackTrace(); for (int j = 1; j < frames.length; ++j) { final String tempCallStack = frames[j].toString(); if (TextUtils.isEmpty(apiCallStack)) { // Overwrite apiCallStack if it's empty apiCallStack = tempCallStack; } else if (tempCallStack.indexOf("Transact(") < 0) { // Overwrite apiCallStack if it's not a binder call apiCallStack = tempCallStack; } else { break; } } } return apiCallStack; } // ---------------------------------------------------------------------- public static boolean isSystemIme(InputMethodInfo inputMethod) { Loading services/java/com/android/server/InputMethodManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -899,7 +899,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub Slog.d(TAG, "--- calledFromForegroundUserOrSystemProcess ? " + "calling uid = " + uid + " system uid = " + Process.SYSTEM_UID + " calling userId = " + userId + ", foreground user id = " + mSettings.getCurrentUserId() + ", calling pid = " + Binder.getCallingPid()); + mSettings.getCurrentUserId() + ", calling pid = " + Binder.getCallingPid() + InputMethodUtils.getApiCallStack()); } if (uid == Process.SYSTEM_UID || userId == mSettings.getCurrentUserId()) { return true; Loading Loading
core/java/com/android/internal/inputmethod/InputMethodUtils.java +22 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,28 @@ public class InputMethodUtils { } return sb.toString(); } public static String getApiCallStack() { String apiCallStack = ""; try { throw new RuntimeException(); } catch (RuntimeException e) { final StackTraceElement[] frames = e.getStackTrace(); for (int j = 1; j < frames.length; ++j) { final String tempCallStack = frames[j].toString(); if (TextUtils.isEmpty(apiCallStack)) { // Overwrite apiCallStack if it's empty apiCallStack = tempCallStack; } else if (tempCallStack.indexOf("Transact(") < 0) { // Overwrite apiCallStack if it's not a binder call apiCallStack = tempCallStack; } else { break; } } } return apiCallStack; } // ---------------------------------------------------------------------- public static boolean isSystemIme(InputMethodInfo inputMethod) { Loading
services/java/com/android/server/InputMethodManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -899,7 +899,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub Slog.d(TAG, "--- calledFromForegroundUserOrSystemProcess ? " + "calling uid = " + uid + " system uid = " + Process.SYSTEM_UID + " calling userId = " + userId + ", foreground user id = " + mSettings.getCurrentUserId() + ", calling pid = " + Binder.getCallingPid()); + mSettings.getCurrentUserId() + ", calling pid = " + Binder.getCallingPid() + InputMethodUtils.getApiCallStack()); } if (uid == Process.SYSTEM_UID || userId == mSettings.getCurrentUserId()) { return true; Loading