bb66c21f01
Also unify all Java variable copying into single method. Change-Id: I8fefa615f6f164ae5662913d612b388b46890089