Merge "Move NetworkAgent#register to a new method."