diff options
| author | Dianne Hackborn <hackbod@google.com> | 2012-10-29 18:46:52 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2012-10-29 18:46:52 -0700 |
| commit | ef03a7f441cf0cbef5a5f7fafb58a7d5aea7ef52 (patch) | |
| tree | b7f6b4ab65b6397f60a198f58ce9451c39b876f6 /core/java | |
| parent | 83f60c5247ba60b6aa536b2d8191df9289102600 (diff) | |
| download | frameworks_base-ef03a7f441cf0cbef5a5f7fafb58a7d5aea7ef52.zip frameworks_base-ef03a7f441cf0cbef5a5f7fafb58a7d5aea7ef52.tar.gz frameworks_base-ef03a7f441cf0cbef5a5f7fafb58a7d5aea7ef52.tar.bz2 | |
Work on issue #7343200: Fails to show wallpaper in the background...
...for lockscreen sometimes and remains black / blank
Add some debug output to try to track down what is going on.
Change-Id: I98a96c5da9c04b988e948f6fc2766d927db49ebf
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/os/Debug.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java index c08bfeb..e50c948 100644 --- a/core/java/android/os/Debug.java +++ b/core/java/android/os/Debug.java @@ -1363,6 +1363,23 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo } /** + * Like {@link #getCallers(int)}, but each location is append to the string + * as a new line with <var>linePrefix</var> in front of it. + * @param depth the number of levels to return, starting with the immediate caller. + * @param linePrefix prefix to put in front of each location. + * @return a string describing the call stack. + * {@hide} + */ + public static String getCallers(final int depth, String linePrefix) { + final StackTraceElement[] callStack = Thread.currentThread().getStackTrace(); + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < depth; i++) { + sb.append(linePrefix).append(getCaller(callStack, i)).append("\n"); + } + return sb.toString(); + } + + /** * @return a String describing the immediate caller of the calling function. * {@hide} */ |
