Truncate existing vcf file when exporting contacts

When exporting contacts to an existing vCard file, the file is not
truncated if the new export is smaller than the old one. This leaves
stale contact data at the end of the file, which can be recovered by
recipients.

This change uses mode "wt" for opening the output stream, which ensures
that the file is truncated when opened for writing.

Bug: 473028791
Test: atest ContactsTests:com.android.contacts.vcard.ExportProcessorTest
Flag: EXEMPT BUGFIX

Note: This was autogenerated by MendIt (go/androidmendit)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:ba09ce483c89fcab71f7ab01d582486747b05ce1
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:61ec66e51efc80b66f3f912f560a7b6dc2430618
Merged-In: Iab4f76a190b7e3d7db544aff4e3b0aca63cdb16f
Change-Id: Iab4f76a190b7e3d7db544aff4e3b0aca63cdb16f
2 files changed