diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2015-04-23 03:19:19 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-04-23 03:19:19 -0700 |
| commit | 402701dafda192618d02483ea6e513be4af064e7 (patch) | |
| tree | 60f952095770b38e34394288409f21a0b0e21948 | |
| parent | ef2217346e099bfc47d6946f36c2138a564f42b4 (diff) | |
| parent | 63fce00e8cefd20c94d4d2fd938177e030f79405 (diff) | |
| download | packages_apps_ContactsCommon-402701dafda192618d02483ea6e513be4af064e7.tar.gz packages_apps_ContactsCommon-402701dafda192618d02483ea6e513be4af064e7.tar.bz2 packages_apps_ContactsCommon-402701dafda192618d02483ea6e513be4af064e7.zip | |
Merge "Contacts: Can not export contacts to SIM card properly"
| -rwxr-xr-x | src/com/android/contacts/common/interactions/ImportExportDialogFragment.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java b/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java index ef99300a..63fe01d6 100755 --- a/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java +++ b/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java @@ -580,6 +580,26 @@ public class ImportExportDialogFragment extends AnalyticsDialogFragment TOAST_EXPORT_FAILED, insertCount, 0)); break; } else { + // Failed to insert to SIM card + int anrNumber = 0; + if (!TextUtils.isEmpty(anrNum)) { + anrNumber += anrNum.toString().split( + SimContactsConstants.ANR_SEP).length; + } + // reset emptyNumber and emptyAnr to the value before + // the insert operation + emptyAnr += anrNumber; + emptyNumber += anrNumber; + if (!TextUtils.isEmpty(num)) { + emptyNumber++; + } + + if (!TextUtils.isEmpty(email)) { + // reset emptyEmail to the value before the insert + // operation + emptyEmail += email.toString().split( + SimContactsConstants.EMAIL_SEP).length; + } continue; } } |
