Loading core/java/com/android/internal/inputmethod/InputMethodUtils.java +17 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,23 @@ public class InputMethodUtils { // This utility class is not publicly instantiable. } // ---------------------------------------------------------------------- // Utilities for debug public static String getStackTrace() { final StringBuilder sb = new StringBuilder(); try { throw new RuntimeException(); } catch (RuntimeException e) { final StackTraceElement[] frames = e.getStackTrace(); // Start at 1 because the first frame is here and we don't care about it for (int j = 1; j < frames.length; ++j) { sb.append(frames[j].toString() + "\n"); } } return sb.toString(); } // ---------------------------------------------------------------------- public static boolean isSystemIme(InputMethodInfo inputMethod) { return (inputMethod.getServiceInfo().applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0; Loading services/java/com/android/server/InputMethodManagerService.java +3 −18 Original line number Diff line number Diff line Loading @@ -919,7 +919,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } return true; } Slog.w(TAG, "--- IPC called from background users. Ignore. \n" + getStackTrace()); Slog.w(TAG, "--- IPC called from background users. Ignore. \n" + InputMethodUtils.getStackTrace()); return false; } Loading Loading @@ -2473,7 +2474,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub HashMap<String, InputMethodInfo> map, boolean resetDefaultEnabledIme) { if (DEBUG) { Slog.d(TAG, "--- re-buildInputMethodList reset = " + resetDefaultEnabledIme + " \n ------ \n" + getStackTrace()); + " \n ------ \n" + InputMethodUtils.getStackTrace()); } list.clear(); map.clear(); Loading Loading @@ -3468,22 +3469,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } } // ---------------------------------------------------------------------- // Utilities for debug private static String getStackTrace() { final StringBuilder sb = new StringBuilder(); try { throw new RuntimeException(); } catch (RuntimeException e) { final StackTraceElement[] frames = e.getStackTrace(); // Start at 1 because the first frame is here and we don't care about it for (int j = 1; j < frames.length; ++j) { sb.append(frames[j].toString() + "\n"); } } return sb.toString(); } @Override protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) Loading Loading
core/java/com/android/internal/inputmethod/InputMethodUtils.java +17 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,23 @@ public class InputMethodUtils { // This utility class is not publicly instantiable. } // ---------------------------------------------------------------------- // Utilities for debug public static String getStackTrace() { final StringBuilder sb = new StringBuilder(); try { throw new RuntimeException(); } catch (RuntimeException e) { final StackTraceElement[] frames = e.getStackTrace(); // Start at 1 because the first frame is here and we don't care about it for (int j = 1; j < frames.length; ++j) { sb.append(frames[j].toString() + "\n"); } } return sb.toString(); } // ---------------------------------------------------------------------- public static boolean isSystemIme(InputMethodInfo inputMethod) { return (inputMethod.getServiceInfo().applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0; Loading
services/java/com/android/server/InputMethodManagerService.java +3 −18 Original line number Diff line number Diff line Loading @@ -919,7 +919,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } return true; } Slog.w(TAG, "--- IPC called from background users. Ignore. \n" + getStackTrace()); Slog.w(TAG, "--- IPC called from background users. Ignore. \n" + InputMethodUtils.getStackTrace()); return false; } Loading Loading @@ -2473,7 +2474,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub HashMap<String, InputMethodInfo> map, boolean resetDefaultEnabledIme) { if (DEBUG) { Slog.d(TAG, "--- re-buildInputMethodList reset = " + resetDefaultEnabledIme + " \n ------ \n" + getStackTrace()); + " \n ------ \n" + InputMethodUtils.getStackTrace()); } list.clear(); map.clear(); Loading Loading @@ -3468,22 +3469,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } } // ---------------------------------------------------------------------- // Utilities for debug private static String getStackTrace() { final StringBuilder sb = new StringBuilder(); try { throw new RuntimeException(); } catch (RuntimeException e) { final StackTraceElement[] frames = e.getStackTrace(); // Start at 1 because the first frame is here and we don't care about it for (int j = 1; j < frames.length; ++j) { sb.append(frames[j].toString() + "\n"); } } return sb.toString(); } @Override protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP) Loading