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