Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a746def authored by Walter Jang's avatar Walter Jang
Browse files

Let the user choose where to export vcards to 1/3

Instead of always using external storage.

Also we change the suggested export filename
from something like 00001.vcf to just contacts.vcf.
Since we don't know the destination directory
anymore untill after it is selected, we can't check
if there is already an exported vcf file there in.
The Activity handling ACTION_CREATE_DOCUMENT handles
file name collisions itself anyway.

Screenshots https://goto.google.com/b22208705

Bug 22208705

Change-Id: I17bac2f483e200c13adf1429c0eade17e4d2908a
parent afd6b4ff
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -78,8 +78,8 @@
         entirely disable SIM import on a per-product basis. -->
         entirely disable SIM import on a per-product basis. -->
    <bool name="config_allow_sim_import">true</bool>
    <bool name="config_allow_sim_import">true</bool>


    <!-- Flag indicating whether Contacts app is allowed to export contacts to SDCard -->
    <!-- Flag indicating whether Contacts app is allowed to export contacts -->
    <bool name="config_allow_export_to_sdcard">true</bool>
    <bool name="config_allow_export">true</bool>


    <!-- Flag indicating whether Contacts app is allowed to share contacts with devices outside -->
    <!-- Flag indicating whether Contacts app is allowed to share contacts with devices outside -->
    <bool name="config_allow_share_visible_contacts">true</bool>
    <bool name="config_allow_share_visible_contacts">true</bool>
+0 −1
Original line number Original line Diff line number Diff line
@@ -31,7 +31,6 @@
    <item type="id" name="dialog_cancel_failed"/>
    <item type="id" name="dialog_cancel_failed"/>


    <!-- For ExportVCardActivity -->
    <!-- For ExportVCardActivity -->
    <item type="id" name="dialog_export_confirmation"/>
    <item type="id" name="dialog_exporting_vcard"/>
    <item type="id" name="dialog_exporting_vcard"/>
    <item type="id" name="dialog_fail_to_export_with_reason"/>
    <item type="id" name="dialog_fail_to_export_with_reason"/>


+5 −5
Original line number Original line Diff line number Diff line
@@ -507,6 +507,9 @@ a ren't members of any other group. [CHAR LIMIT=25] -->
    <!-- The title shown when exporting vCard is successfuly finished [CHAR LIMIT=40] -->
    <!-- The title shown when exporting vCard is successfuly finished [CHAR LIMIT=40] -->
    <string name="exporting_vcard_finished_title">Finished exporting <xliff:g id="filename" example="export.vcf">%s</xliff:g>.</string>
    <string name="exporting_vcard_finished_title">Finished exporting <xliff:g id="filename" example="export.vcf">%s</xliff:g>.</string>


    <!-- The filename that is suggested that users use when exporting vCards. Should include the .vcf extension. CHAR LIMIT=40] -->
    <string name="exporting_vcard_filename">contacts.vcf</string>

    <!-- The title shown when exporting vCard is canceled (probably by a user)
    <!-- The title shown when exporting vCard is canceled (probably by a user)
         The argument is file name the user canceled importing.
         The argument is file name the user canceled importing.
         [CHAR LIMIT=40] -->
         [CHAR LIMIT=40] -->
@@ -547,9 +550,6 @@ a ren't members of any other group. [CHAR LIMIT=25] -->
    <!-- Dialog message shown when SDcard does not exist. [CHAR LIMIT=30] -->
    <!-- Dialog message shown when SDcard does not exist. [CHAR LIMIT=30] -->
    <string name="no_sdcard_message" product="default">No SD card was found.</string>
    <string name="no_sdcard_message" product="default">No SD card was found.</string>


    <!-- Dialog message shown when a user confirms whether he/she export Contact data [CHAR LIMIT=NONE] -->
    <string name="confirm_export_message">Your contact list will be exported to file: <xliff:g id="vcard_filename">%s</xliff:g>.</string>

    <!-- Description shown when importing vCard data.
    <!-- Description shown when importing vCard data.
         The argument is the name of a contact which is being read.
         The argument is the name of a contact which is being read.
         [CHAR LIMIT=20] -->
         [CHAR LIMIT=20] -->
@@ -657,8 +657,8 @@ a ren't members of any other group. [CHAR LIMIT=25] -->
         [CHAR LIMIT=20] -->
         [CHAR LIMIT=20] -->
    <string name="progress_notifier_message">Importing <xliff:g id="current_number">%s</xliff:g>/<xliff:g id="total_number">%s</xliff:g>: <xliff:g id="name" example="Joe Due">%s</xliff:g></string>
    <string name="progress_notifier_message">Importing <xliff:g id="current_number">%s</xliff:g>/<xliff:g id="total_number">%s</xliff:g>: <xliff:g id="name" example="Joe Due">%s</xliff:g></string>


    <!-- Action that exports all contacts to (USB) storage [CHAR LIMIT=25] -->
    <!-- Action that exports all contacts to a user selected destination. [CHAR LIMIT=25] -->
    <string name="export_to_sdcard" product="default">Export to storage</string>
    <string name="export" product="default">Export</string>


    <!-- Contact preferences related strings -->
    <!-- Contact preferences related strings -->