diff options
Diffstat (limited to 'telecomm/java/android/telecom/Logging/SessionManager.java')
-rw-r--r-- | telecomm/java/android/telecom/Logging/SessionManager.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/Logging/SessionManager.java b/telecomm/java/android/telecom/Logging/SessionManager.java index 949f7b7a89ae..49c3a7205d59 100644 --- a/telecomm/java/android/telecom/Logging/SessionManager.java +++ b/telecomm/java/android/telecom/Logging/SessionManager.java @@ -391,6 +391,20 @@ public class SessionManager { return mCurrentThreadId.get(); } + /** + * @return A String representation of the active sessions at the time that this method is + * called. + */ + @VisibleForTesting + public synchronized String printActiveSessions() { + StringBuilder message = new StringBuilder(); + for (ConcurrentHashMap.Entry<Integer, Session> entry : mSessionMapper.entrySet()) { + message.append(entry.getValue().printFullSessionTree()); + message.append("\n"); + } + return message.toString(); + } + @VisibleForTesting public synchronized void cleanupStaleSessions(long timeoutMs) { String logMessage = "Stale Sessions Cleaned:\n"; |