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
Loading
Please register or sign in to comment