summaryrefslogtreecommitdiff
path: root/core/java/android/util/DebugUtils.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-12-20 12:10:01 -0800
committerDianne Hackborn <hackbod@google.com>2010-12-20 14:10:31 -0800
commita2ea747faaf5fcd437afbaaf4085cfc29e7c16b8 (patch)
tree3e5de42a2c88daf93578136684d265d0e3c3f54d /core/java/android/util/DebugUtils.java
parent2a1cc5ac30efc05880a12a2114c09364fc38e032 (diff)
More cleanup of Loader APIs.
- Remove old method names. - Introduce onXxx() hooks to Loader. - Improve debugging. Change-Id: I3fba072a05c7023aa7d2c3eb4e126feb514ab6d8
Diffstat (limited to 'core/java/android/util/DebugUtils.java')
-rw-r--r--core/java/android/util/DebugUtils.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/java/android/util/DebugUtils.java b/core/java/android/util/DebugUtils.java
index 56f389c9faa9..65fc35c8947e 100644
--- a/core/java/android/util/DebugUtils.java
+++ b/core/java/android/util/DebugUtils.java
@@ -101,4 +101,23 @@ public class DebugUtils {
return match;
}
+ /** @hide */
+ public static void buildShortClassTag(Object cls, StringBuilder out) {
+ if (cls == null) {
+ out.append("null");
+ } else {
+ String simpleName = cls.getClass().getSimpleName();
+ if (simpleName == null || simpleName.isEmpty()) {
+ simpleName = cls.getClass().getName();
+ int end = simpleName.lastIndexOf('.');
+ if (end > 0) {
+ simpleName = simpleName.substring(end+1);
+ }
+ }
+ out.append(simpleName);
+ out.append('{');
+ out.append(Integer.toHexString(System.identityHashCode(cls)));
+ }
+ }
+
}