TizenRefApp-6811 Implement import from Sim card functionality 43/83243/4
authorSergei Kobec <s.kobec@samsung.com>
Thu, 11 Aug 2016 08:45:54 +0000 (11:45 +0300)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 11 Aug 2016 10:52:46 +0000 (03:52 -0700)
Change-Id: Id2c5b41560c6f5c1081f0bf80fbb35ae09bd311a
Signed-off-by: Sergei Kobec <s.kobec@samsung.com>
52 files changed:
contacts-app/res/po/ar.po
contacts-app/res/po/az.po
contacts-app/res/po/bg.po
contacts-app/res/po/ca.po
contacts-app/res/po/cs.po
contacts-app/res/po/da.po
contacts-app/res/po/de.po
contacts-app/res/po/el_GR.po
contacts-app/res/po/en.po
contacts-app/res/po/en_PH.po
contacts-app/res/po/en_US.po
contacts-app/res/po/es_ES.po
contacts-app/res/po/es_US.po
contacts-app/res/po/et.po
contacts-app/res/po/eu.po
contacts-app/res/po/fi.po
contacts-app/res/po/fr.po
contacts-app/res/po/fr_CA.po
contacts-app/res/po/ga.po
contacts-app/res/po/gl.po
contacts-app/res/po/hi.po
contacts-app/res/po/hr.po
contacts-app/res/po/hu.po
contacts-app/res/po/hy.po
contacts-app/res/po/is.po
contacts-app/res/po/it_IT.po
contacts-app/res/po/ja_JP.po
contacts-app/res/po/ka.po
contacts-app/res/po/kk.po
contacts-app/res/po/ko_KR.po
contacts-app/res/po/lt.po
contacts-app/res/po/lv.po
contacts-app/res/po/mk.po
contacts-app/res/po/nb.po
contacts-app/res/po/nl.po
contacts-app/res/po/pl.po
contacts-app/res/po/pt_BR.po
contacts-app/res/po/pt_PT.po
contacts-app/res/po/ro.po
contacts-app/res/po/ru_RU.po
contacts-app/res/po/sk.po
contacts-app/res/po/sl.po
contacts-app/res/po/sr.po
contacts-app/res/po/sv.po
contacts-app/res/po/tr_TR.po
contacts-app/res/po/uk.po
contacts-app/res/po/uz.po
contacts-app/res/po/zh_CN.po
contacts-app/res/po/zh_HK.po
contacts-app/res/po/zh_TW.po
lib-contacts/inc/Contacts/Settings/ImportItem.h
lib-contacts/src/Contacts/Settings/ImportItem.cpp

index fe637fb..1f568dd 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "أخت"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "بطاقة SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "مشاركة"
 
index f0ab918..52893f6 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Bacı"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM kart"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Paylaş"
 
index 5aee14b..df22374 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Сестра"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM карта"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Споделяне"
 
index cc2a863..a1e53ed 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Germana"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Targeta SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Compartir"
 
index 8e09c49..235d513 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Sestra"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM karta"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Sdílet"
 
index e1b9a2f..c63d3db 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Søster"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM-kort"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Del"
 
index b5bbac8..6cb8086 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Schwester"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM-Karte"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Senden"
 
index ca302be..1265ff1 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Αδερφή"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Κάρτα SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Κοινή χρήση"
 
index 7154246..58e933b 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Sister"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM card"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Share"
 
index 8d4fc5a..ca98bd6 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Sister"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM card"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Share"
 
index 2c11123..95187c2 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Sister"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM card"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Share"
 
index 7fc3c7b..c9a0f72 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Hermana"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Tarjeta SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Compartir"
 
index c5b045e..b4eb15a 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Hermana"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Tarjeta SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Compartir"
 
index cd3c919..0bbdd57 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Õde"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM-kaart"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Jaga"
 
index 9ba453b..2dfef5b 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Arreba/ahizpa"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM txartela"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Partekatu"
 
index 2b89b7f..18cc9d9 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Sisko"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM-kortti"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Jaa"
 
index 5c6905b..74b65a3 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Sœur"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Carte SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Partager"
 
index ea3260c..85792dc 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Sœur"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Carte SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Partager"
 
index bebd6b9..f621c73 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Deirfiúr"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Cárta SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Comhroinn"
 
index 2049603..28aca7a 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Irmá"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Tarxeta SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Compartir"
 
index fa25dfb..4678360 100644 (file)
@@ -388,6 +388,9 @@ msgstr "स्काइप"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "बहन"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM कार्ड"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "साझा करें"
 
index d7aaab8..0be37b5 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Sestra"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM kartica"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Dijeli"
 
index 3e4e906..1cef10b 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Lánytestvér"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM kártya"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Megosztás"
 
index 677c0b0..370fa14 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Քույր"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM քարտ"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Համօգտագործել"
 
index 0eae89d..cf4bd6b 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Systir"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM-kort"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Deila"
 
index 8182014..1691ae8 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Sorella"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Scheda SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Condividi"
 
index acfd020..722edee 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "姉妹"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIMカード"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "共有"
 
index 40f075d..c3b081d 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "და"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM ბარათი"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "გაზიარება"
 
index dd415ed..b389509 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Әпке"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM картасы"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Бөлісу"
 
index 62b40e9..eefad2d 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "자매"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM 카드"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "공유"
 
index 4bc504e..9daca98 100644 (file)
@@ -388,6 +388,9 @@ msgstr "„Skype“"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Sesuo"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM kortelė"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Dalytis"
 
index 52f4ca8..015e935 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Māsa"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM karte"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Kopīgot"
 
index b2f780d..ad3fc04 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Сестра"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM-картичка"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Сподели"
 
index 871b0b0..98c3959 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Søster"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM-kort"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Del"
 
index 3269faa..f26a720 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Zus"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM-kaart"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Delen"
 
index b35587e..51e453e 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Siostra"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Karta SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Udostępnij"
 
index 9575dbb..45db2af 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Irmã"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Cartão SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Compartilhar"
 
index b31e329..8a06265 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Irmã"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Cartão SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Enviar"
 
index 344778b..8aafc1c 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Soră"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Card SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Partajați"
 
index 190ac4a..6d4648d 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Сестра"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM-карта"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Отправить"
 
index c85e3ec..3d63b7a 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Sestra"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Karta SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Zdieľať"
 
index 1c9caf9..85edcd8 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Sestra"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "Kartica SIM"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Skupna raba"
 
index 6941d2e..52c2b71 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Sestra"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM kartica"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Podeli"
 
index 4f15325..bc3da60 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Syster"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM-kort"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Dela"
 
index 74c9965..0571198 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Kız kardeş"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM kartı"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Paylaş"
 
index 07944e2..c4b573e 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Сестра"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM-картка"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Поділитися"
 
index b03ceeb..18a942f 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "Singil"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM-karta"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "Ulashish"
 
index ab7e748..c1a5578 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "姐妹"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM卡"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "分享"
 
index c2eb00c..35762b2 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "姊妹"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM 卡"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "分享"
 
index 15081c2..f2d580e 100644 (file)
@@ -388,6 +388,9 @@ msgstr "Skype"
 msgid "IDS_PB_OPT_SISTER"
 msgstr "姊妹"
 
+msgid "IDS_PB_OPT_SIM_CARD"
+msgstr "SIM 卡"
+
 msgid "IDS_PB_OPT_SHARE"
 msgstr "分享"
 
index 2f8f068..db6653f 100644 (file)
@@ -38,6 +38,9 @@ namespace Contacts
 
                        void onPickResult(app_control_h request, app_control_h reply, app_control_result_e result);
                        void onImportFinish(ImportController *importer);
+                       void onStorageSelected(void *data);
+
+                       void importFromSim();
 
                        App::AppControl m_AppControl;
                };
index dfa2760..1bb4461 100644 (file)
 #include "App/AppControlRequest.h"
 #include "Ui/Genlist.h"
 #include "Ui/ListPopup.h"
+#include "Ui/ProcessPopup.h"
 #include "Utils/Callback.h"
 #include "Utils/Logger.h"
+#include "Utils/Thread.h"
 
 #include <app_i18n.h>
 #include <notification.h>
 
 using namespace Contacts::Settings;
 using namespace Contacts::Settings::Model;
+using namespace std::placeholders;
 using namespace Ui;
 
 #define BUFFER_SIZE 1024
 
+enum ImportStorageType
+{
+       ImportStorageDevice = STORAGE_TYPE_INTERNAL,
+       ImportStorageSdCard = STORAGE_TYPE_EXTERNAL,
+       ImportStorageSimCard
+};
+
 char *ImportItem::getText(Evas_Object *parent, const char *part)
 {
        if (strcmp(part, "elm.text") == 0) {
@@ -45,22 +55,22 @@ char *ImportItem::getText(Evas_Object *parent, const char *part)
 
 void ImportItem::onSelected()
 {
-       auto launchPick = [this](void *data) {
-               storage_type_e storageType = (storage_type_e) (long) data;
-
-               m_AppControl = App::requestPickVcard(getDirectoryPath(storageType, STORAGE_DIRECTORY_MAX).c_str());
-               m_AppControl.launch(makeCallbackWithLastParam(&ImportItem::onPickResult), this);
-       };
-
        if (isAccessGranted(STORAGE_TYPE_EXTERNAL, StorageAccessRead)) {
                ListPopup *popup = new ListPopup();
                popup->create(getParent()->getEvasObject());
                popup->setTitle("IDS_PB_HEADER_IMPORT");
-               popup->addItem("IDS_PB_OPT_SD_CARD", (void *) STORAGE_TYPE_EXTERNAL);
-               popup->addItem("IDS_PB_OPT_DEVICE", (void *) STORAGE_TYPE_INTERNAL);
-               popup->setSelectedCallback(launchPick);
+               popup->addItem("IDS_PB_OPT_SD_CARD", (void *) ImportStorageSdCard);
+               popup->addItem("IDS_PB_OPT_DEVICE", (void *) ImportStorageDevice);
+
+               bool isSimInitialized = false;
+               contacts_sim_get_initialization_status_by_sim_slot_no(0, &isSimInitialized);
+               if (isSimInitialized) {
+                       popup->addItem("IDS_PB_OPT_SIM_CARD", (void *) ImportStorageSimCard);
+               }
+
+               popup->setSelectedCallback(std::bind(&ImportItem::onStorageSelected, this, _1));
        } else {
-               launchPick((void *) STORAGE_TYPE_INTERNAL);
+               onStorageSelected((void *) ImportStorageDevice);
        }
 }
 
@@ -91,3 +101,32 @@ void ImportItem::onImportFinish(ImportController *importer)
        }
        WARN_IF_ERR(err, "notification_status_message_post() failed.");
 }
+
+void ImportItem::onStorageSelected(void *data)
+{
+       ImportStorageType storageType = (ImportStorageType) (long) data;
+
+       if (storageType == ImportStorageSimCard) {
+               importFromSim();
+       } else {
+               m_AppControl = App::requestPickVcard(getDirectoryPath((storage_type_e) storageType,
+                               STORAGE_DIRECTORY_MAX).c_str());
+               m_AppControl.launch(makeCallbackWithLastParam(&ImportItem::onPickResult), this);
+       }
+}
+
+void ImportItem::importFromSim()
+{
+       Ui::ProcessPopup *popup = Ui::ProcessPopup::create(getParent()->getEvasObject(),
+                       "IDS_PB_HEADER_IMPORT_CONTACTS_ABB2");
+
+       new Utils::Thread([] {
+               contacts_connect_on_thread();
+               contacts_sim_import_all_contacts_by_sim_slot_no(0);
+               contacts_disconnect_on_thread();
+       }, [popup] {
+               popup->close();
+               int err = notification_status_message_post(_("IDS_PB_SBODY_CONTACTS_IMPORTED_M_STATUS_ABB"));
+               WARN_IF_ERR(err, "notification_status_message_post() failed.");
+       });
+}