diff options
author | Satoshi Kataoka <satok@google.com> | 2013-07-31 18:30:13 +0900 |
---|---|---|
committer | Satoshi Kataoka <satok@google.com> | 2013-07-31 18:33:48 +0900 |
commit | 0766eb045c0e2ecbc4317743b025618654ddea38 (patch) | |
tree | 4299a9279f2ccf250c9e29b43b6d36433d08fa71 /services/java/com/android/server/InputMethodManagerService.java | |
parent | 5b537bf320f22e892da1d827d54b77f558909a69 (diff) |
Small refactor on InputMethodUtils
Change-Id: Ie4f797508c02abb13c7fe1be162ec4dc18829925
Diffstat (limited to 'services/java/com/android/server/InputMethodManagerService.java')
-rw-r--r-- | services/java/com/android/server/InputMethodManagerService.java | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index 35656f8367c2..8200a690e0db 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -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; } @@ -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(); @@ -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) |