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

Change-Id: I068dcbfcdaffff85379d422a9c53aafe7caa01c2