diff options
-rw-r--r-- | res/values/strings.xml | 3 | ||||
-rw-r--r-- | src/com/android/contacts/common/vcard/NotificationImportExportListener.java | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index df4b068c..c3df2457 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -590,9 +590,6 @@ a ren't members of any other group. [CHAR LIMIT=25] --> data storage. [CHAR LIMIT=NONE] --> <string name="caching_vcard_message">Caching vCard(s) to local temporary storage. The actual import will start soon.</string> - <!-- The percentage, used for expressing the progress of vCard import/export. --> - <string name="percentage"><xliff:g id="percentage" example="50">%s</xliff:g><xliff:g id="percentsign" example="%">%%</xliff:g></string> - <!-- Message used when vCard import has failed. [CHAR LIMIT=40] --> <string name="vcard_import_failed">Couldn\'t import vCard.</string> diff --git a/src/com/android/contacts/common/vcard/NotificationImportExportListener.java b/src/com/android/contacts/common/vcard/NotificationImportExportListener.java index f873e316..41f6a50f 100644 --- a/src/com/android/contacts/common/vcard/NotificationImportExportListener.java +++ b/src/com/android/contacts/common/vcard/NotificationImportExportListener.java @@ -32,6 +32,8 @@ import android.widget.Toast; import com.android.contacts.common.R; import com.android.vcard.VCardEntry; +import java.text.NumberFormat; + public class NotificationImportExportListener implements VCardImportExportListener, Handler.Callback { /** The tag used by vCard-related notifications. */ @@ -223,8 +225,9 @@ public class NotificationImportExportListener implements VCardImportExportListen : android.R.drawable.stat_sys_upload) .setContentIntent(PendingIntent.getActivity(context, 0, intent, 0)); if (totalCount > 0) { - builder.setContentText(context.getString(R.string.percentage, - String.valueOf(currentCount * 100 / totalCount))); + String percentage = + NumberFormat.getPercentInstance().format((double) currentCount / totalCount); + builder.setContentText(percentage); } return builder.getNotification(); } |