Revert "Remove unused codes that was used in setChildChain"

This reverts commit b1144d76717e0f858e87f2bd673ce0f519234baa.

Reason for revert: We decided to have experiment and switch old code path and new code path based on a flag. So the codes removed by this CL is needed.

Bug: 217624062
Test: m

Change-Id: Icb8a353a74935ed97f8e102ba54020825676b817
4 files changed