static void dumpAll(Path p, String prefix1, String prefix2) { synchronized (Path.class) { MediaObject obj = p.getObject(); Log.d( TAG, prefix1 + p.mSegment + ":" + (obj == null ? "null" : obj.getClass().getSimpleName())); if (p.mChildren != null) { ArrayList<String> childrenKeys = p.mChildren.keys(); int i = 0, n = childrenKeys.size(); for (String key : childrenKeys) { Path child = p.mChildren.get(key); if (child == null) { ++i; continue; } Log.d(TAG, prefix2 + "|"); if (++i < n) { dumpAll(child, prefix2 + "+-- ", prefix2 + "| "); } else { dumpAll(child, prefix2 + "+-- ", prefix2 + " "); } } } } }
static void dumpAll() { dumpAll(sRoot, "", ""); }