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