Merge changes from topic 'am-72bbc108e9a84456ab88db3270cbb4e9' into nyc-mr2-dev-plus-aosp

* changes:
  Do not write if apply() did not change the file. am: 1f99f81bdc am: 331a4bb8d4 am: 0dfa7b58b8
  Only persist last Shared Preferences state am: d15c4f1da5 am: 889a420a9e  -s ours am: 2288ee6b01