Merge "Revert^2 "Update NetworkAgent#register to compatible with old NetworkAgentTest"" into main