Do not write if apply() did not change the file. am: 1f99f81bdc
am: 331a4bb8d4

Change-Id: If200192c12477a4410b0b358e6c7b430c23d1499