Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29a5abd4 authored by Thomas Stuart's avatar Thomas Stuart
Browse files

Correct tree printing logic to prevent crash

The previous iterative implementation for printing the session tree in
`printSessionTreeLegacy` contained flawed logic for calculating indentation
depth. This led to two issues:

1. A `java.lang.IllegalArgumentException` was thrown when the depth counter
   became negative.
2. For most tree structures, the logged output was incorrectly indented,
   making it difficult to read.

This change replaces the buggy method with a standard, recursive
implementation (`printSessionTree`) that properly handles indentation.
This resolves both the crash and the visual bug in the logs.

Flag: com.android.server.telecom.flags.fix_session_tree_logging
Fixes: 427861789
Test: new unit test
Change-Id: Icfd1cae9be02c5fec8387053dc78f26bc1d5ff08
parent b1640c13
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment