Merge "Bound Telecom logging recursion" am: 63dc1d5081
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1691210 Change-Id: Idd018303d9dfb818c5be3621c38a723d680b0240
This commit is contained in:
@@ -453,19 +453,19 @@ public class Session {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
if (mParentSession != null && mIsStartedFromActiveSession) {
|
Session sessionToPrint = this;
|
||||||
|
if (getParentSession() != null && isStartedFromActiveSession()) {
|
||||||
// Log.startSession was called from within another active session. Use the parent's
|
// Log.startSession was called from within another active session. Use the parent's
|
||||||
// Id instead of the child to reduce confusion.
|
// Id instead of the child to reduce confusion.
|
||||||
return mParentSession.toString();
|
sessionToPrint = getRootSession("toString");
|
||||||
} else {
|
}
|
||||||
StringBuilder methodName = new StringBuilder();
|
StringBuilder methodName = new StringBuilder();
|
||||||
methodName.append(getFullMethodPath(false /*truncatePath*/));
|
methodName.append(sessionToPrint.getFullMethodPath(false /*truncatePath*/));
|
||||||
if (mOwnerInfo != null && !mOwnerInfo.isEmpty()) {
|
if (sessionToPrint.getOwnerInfo() != null && !sessionToPrint.getOwnerInfo().isEmpty()) {
|
||||||
methodName.append("(");
|
methodName.append("(");
|
||||||
methodName.append(mOwnerInfo);
|
methodName.append(sessionToPrint.getOwnerInfo());
|
||||||
methodName.append(")");
|
methodName.append(")");
|
||||||
}
|
}
|
||||||
return methodName.toString() + "@" + getFullSessionId();
|
return methodName.toString() + "@" + sessionToPrint.getFullSessionId();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user