TizenRefApp-5502 Crash when Sending Message from End Call Screen. 21/58021/4
authorOleksander Kostenko <o.kostenko@samsung.com>
Tue, 26 Jan 2016 19:13:28 +0000 (21:13 +0200)
committerOleksander Kostenko <o.kostenko@samsung.com>
Wed, 27 Jan 2016 16:40:30 +0000 (18:40 +0200)
Change-Id: Id64b29affe5057d3ed35e9f3fa9f64df64b072c0
Signed-off-by: Oleksander Kostenko <o.kostenko@samsung.com>
src/Common/Controller/inc/NaviFrameController.h
src/Common/Controller/src/NaviFrameController.cpp
src/Common/View/inc/NaviFrameView.h
src/Common/View/src/NaviFrameView.cpp
src/Conversation/Main/Controller/inc/Conversation.h
src/Conversation/Main/Controller/src/Conversation.cpp
tizen-manifest-private.xml

index fedea32..0b70bf2 100644 (file)
@@ -39,11 +39,6 @@ namespace Msg
             virtual ~NaviFrameController();
 
             /**
-             * Pushes @frame to screen.
-             */
-            void push(FrameController &frame);
-
-            /**
              * Pops last frame. Exit from app if frame count reaches zero.
              */
             void pop();
@@ -69,6 +64,8 @@ namespace Msg
             T *getFrame() const;
             bool execCmd(const AppControlCommand &cmd);
 
+            bool isUnreadNotificationSingle(AppControlDefault::DefaultType type) const;
+
             virtual void onHwBackButtonClicked();
             virtual void onHwMoreButtonClicked();
 
index 37364b1..a11e880 100644 (file)
@@ -44,11 +44,6 @@ void NaviFrameController::init()
     setHwButtonListener(getEo(), this);
 }
 
-void NaviFrameController::push(FrameController &frame)
-{
-    NaviFrameView::push(frame);
-}
-
 void NaviFrameController::pop()
 {
     if(isLastFrame())
@@ -81,27 +76,26 @@ void NaviFrameController::execCmd(const AppControlDefaultRef &cmd)
     {
         AppControlDefault::DefaultType type = cmd->getDefaultType();
 
-        Conversation *conv = getFrame<Conversation>();
-        if(conv)
-            pop();
-
-        MsgThread *thread = getFrame<MsgThread>();
-        if(!thread && type != AppControlDefault::ReplyType)
-            push(*new MsgThread(*this));
+        MsgThread *thread = getFrame<MsgThread>(); // Check if thread is open
+        if(!thread)
+            insertToBottom(*new MsgThread(*this)); // Push thread list to the bottom
 
-        if(type == AppControlDefault::ReplyType || type == AppControlDefault::ViewType)
+        Conversation *conv = getFrame<Conversation>(); // Check if conversation is open
+        if(type != AppControlDefault::MainType)
         {
-            Conversation *conv = new Conversation(*this);
-            conv->execCmd(cmd);
-            push(*conv);
-        }
-        else if(type == AppControlDefault::NotificationType)
-        {
-            if(getMsgEngine().getStorage().getUnreadThreadCount() == 1)
+            if(conv)
             {
-                Conversation *conv = new Conversation(*this);
+                promote(*conv);
                 conv->execCmd(cmd);
-                push(*conv);
+            }
+            else if(!conv)
+            {
+                if(type == AppControlDefault::ViewType || type == AppControlDefault::ReplyType || isUnreadNotificationSingle(type))
+                {
+                        Conversation *conversation = new Conversation(*this);
+                        conversation->execCmd(cmd);
+                        push(*conversation);
+                }
             }
         }
     }
@@ -111,16 +105,16 @@ void NaviFrameController::execCmd(const AppControlComposeRef &cmd)
 {
     if(execCmd(*cmd))
     {
-        if(isEmpty())
+        Conversation *conv = getFrame<Conversation>();
+        if(conv)
         {
-            Conversation *conv = new Conversation(*this);
             conv->execCmd(cmd);
-            push(*conv);
         }
         else
         {
-            //TODO: Handle this case (erase or save previous data)
-            MSG_LOG_WARN("App was already launched! You may lost previous data!");
+            Conversation *conv = new Conversation(*this);
+            conv->execCmd(cmd);
+            push(*conv);
         }
     }
 }
@@ -138,6 +132,11 @@ T *NaviFrameController::getFrame() const
     return nullptr;
 }
 
+bool NaviFrameController::isUnreadNotificationSingle(AppControlDefault::DefaultType type) const
+{
+    return type == AppControlDefault::NotificationType && getMsgEngine().getStorage().getUnreadThreadCount() == 1;
+}
+
 void NaviFrameController::onHwBackButtonClicked()
 {
     pop();
index 57f61f1..c21358e 100644 (file)
@@ -56,6 +56,8 @@ namespace Msg
             void push(NaviFrameItem &item, Evas_Object *content = nullptr);
             void push(NaviFrameItem &item, View &content);
             void pop();
+            void insertToBottom(NaviFrameItem &item);
+            void promote(NaviFrameItem &item);
 
         private:
             void create(Evas_Object *parent);
index e0a6bcb..d4ebd50 100644 (file)
@@ -90,7 +90,7 @@ bool NaviFrameView::isEmpty() const
 
 void NaviFrameView::push(NaviFrameItem &item, Evas_Object *content)
 {
-    Elm_Object_Item *it = elm_naviframe_item_push(getEo(), NULL, NULL, NULL, content, NULL);
+    Elm_Object_Item *it = elm_naviframe_item_push(getEo(), nullptr, nullptr, nullptr, content, nullptr);
     item.setElmObjItem(it);
 }
 
@@ -103,3 +103,21 @@ void NaviFrameView::pop()
 {
     elm_naviframe_item_pop(getEo());
 }
+
+void NaviFrameView::insertToBottom(NaviFrameItem &item)
+{
+    Elm_Object_Item *before = elm_naviframe_bottom_item_get(getEo());
+    Elm_Object_Item *insert = nullptr;
+
+    if(before)
+        insert = elm_naviframe_item_insert_before(getEo(), before, nullptr, nullptr, nullptr, nullptr, nullptr);
+    else
+        insert = elm_naviframe_item_push(getEo(), nullptr, nullptr, nullptr, nullptr, nullptr);
+
+    item.setElmObjItem(insert);
+}
+
+void NaviFrameView::promote(NaviFrameItem &item)
+{
+    elm_naviframe_item_promote(item);
+}
index 4441c9f..db81247 100644 (file)
@@ -67,6 +67,12 @@ namespace Msg
                 ConversationMode
             };
 
+            struct DefferedCmd
+            {
+                AppControlComposeRef composeCmd;
+                AppControlDefaultRef defaultCmd;
+            };
+
         private:
             // NaviFrameItem:
             virtual void onAttached(ViewItem &item);
@@ -95,6 +101,8 @@ namespace Msg
              // Popup callbacks:
             void onPopupDel(Evas_Object *popup, void *eventInfo);
             void onMsgSendErrorButtonClicked(Popup &popup, int buttonId);
+            void onNoRecipCancelButtonClicked(Popup &popup, int buttonId);
+            void onNoRecipDiscardButtonClicked(Popup &popup, int buttonId);
 
             // ContextPopup callbacks:
             void onDeleteItemPressed(ContextPopupItem &item);
@@ -129,16 +137,19 @@ namespace Msg
             void markAsRead();
             void recipientClickHandler(const std::string &address);
             MsgAddressListRef getAddressList();
+            void resetDefferedCmd();
+            bool isDefferedCmd() const;
+            bool isRecipExists() const;
+            bool isBodyEmpty() const;
+            void notifyConvertMsgType();
+            void convertMsgTypeHandler();
+            void checkAndSetMsgType();
 
             void showMainCtxPopup();
             void showNoRecipPopup();
             void showRecipPopup();
             void showSendResultPopup(MsgTransport::SendResult result);
 
-            void notifyConvertMsgType();
-            void convertMsgTypeHandler();
-            void checkAndSetMsgType();
-
             void sendMessage();
             void fillMessage(Message &msg);
             void fillMsgAddress(Message &msg);
@@ -159,6 +170,7 @@ namespace Msg
             bool m_IsMms; // Compose message type
             ConvList *m_pConvList;
             AttachPanel m_AttachPanel;
+            DefferedCmd m_DefferedCmd;
     };
 }
 
index a1de0d7..4d92b79 100644 (file)
@@ -52,7 +52,6 @@ Conversation::~Conversation()
 {
     // Call before delete all children:
     MSG_LOG("");
-    saveDraftMsg();
     getMsgEngine().getStorage().removeListener(*this);
     if(m_pBody)
         m_pBody->setListener(nullptr);
@@ -65,6 +64,17 @@ Conversation::~Conversation()
 
 void Conversation::execCmd(const AppControlComposeRef &cmd)
 {
+    if(!isRecipExists() && !isBodyEmpty() && m_Mode == NewMessageMode) // Check if we can save draft to avoid losing data
+    {
+        m_DefferedCmd.composeCmd = cmd;
+        showNoRecipPopup();
+        return;
+    }
+    else
+    {
+        saveDraftMsg();
+    }
+
     setThreadId(ThreadId());
     if(m_pRecipPanel)
         m_pRecipPanel->execCmd(cmd);
@@ -74,6 +84,23 @@ void Conversation::execCmd(const AppControlComposeRef &cmd)
 
 void Conversation::execCmd(const AppControlDefaultRef &cmd)
 {
+    if(!isRecipExists() && !isBodyEmpty() && m_Mode == NewMessageMode) // Check if we can save draft to avoid losing data
+    {
+        m_DefferedCmd.defaultCmd = cmd;
+        showNoRecipPopup();
+        return;
+    }
+    else
+    {
+        saveDraftMsg();
+    }
+
+    if(cmd->getDefaultType() == AppControlDefault::NotificationType && getMsgEngine().getStorage().getUnreadThreadCount() > 1)
+    {
+        getParent().pop();
+        return;
+    }
+
     setThreadId(getMsgEngine().getStorage().getMessage(cmd->getMessageId())->getThreadId());
     if(cmd->getDefaultType() == AppControlDefault::ReplyType)
         m_pBody->setFocus(true);
@@ -317,7 +344,8 @@ void Conversation::sendMessage()
 {
     if(!m_ThreadId.isValid() && m_pRecipPanel->isMbeEmpty())
     {
-        showNoRecipPopup();
+        notification_status_message_post(msg("IDS_MSG_TPOP_ADD_RECIPIENTS").cStr());
+        m_pRecipPanel->setEntryFocus(true);
         return;
     }
 
@@ -347,7 +375,7 @@ void Conversation::sendMessage()
 
 void Conversation::saveDraftMsg()
 {
-    if(m_pBody && !m_pBody->isEmpty())
+    if(!isBodyEmpty())
     {
         MessageRef msg = getMsgEngine().getComposer().createMessage(m_IsMms ? Message::MT_MMS : Message::MT_SMS);
 
@@ -391,11 +419,33 @@ void Conversation::checkAndSetMsgType()
     }
 }
 
+void Conversation::resetDefferedCmd()
+{
+    m_DefferedCmd.composeCmd.reset();
+    m_DefferedCmd.defaultCmd.reset();
+}
+
+bool Conversation::isDefferedCmd() const
+{
+    return m_DefferedCmd.composeCmd || m_DefferedCmd.defaultCmd;
+}
+
+bool Conversation::isRecipExists() const
+{
+    return m_pRecipPanel && !m_pRecipPanel->isMbeEmpty();
+}
+
+bool Conversation::isBodyEmpty() const
+{
+    return m_pBody && m_pBody->isEmpty();
+}
+
 void Conversation::showNoRecipPopup()
 {
     Popup &popup = getApp().getPopupManager().getPopup();
     popup.addEventCb(EVAS_CALLBACK_DEL, EVAS_EVENT_CALLBACK(Conversation, onPopupDel), this);
-    popup.addButton(msgt("IDS_MSG_BUTTON_OK_ABB"), Popup::OkButtonId, POPUP_BUTTON_CB(Conversation, onMsgSendErrorButtonClicked), this);
+    popup.addButton(msgt("IDS_MSG_BUTTON_CANCEL_ABB"), Popup::CancelButtonId, POPUP_BUTTON_CB(Conversation, onNoRecipCancelButtonClicked), this);
+    popup.addButton(msgt("IDS_MSG_BUTTON_DISCARD_ABB"), Popup::OkButtonId, POPUP_BUTTON_CB(Conversation, onNoRecipDiscardButtonClicked), this);
     popup.setContent(msgt("IDS_MSG_POP_YOUR_MESSAGE_WILL_BE_DISCARDED_NO_RECIPIENTS_HAVE_BEEN_SELECTED"));
     popup.show();
 }
@@ -591,7 +641,16 @@ void Conversation::onHwBackButtonClicked()
         return;
     }
 
-    getParent().pop();
+    if(!isRecipExists() && !isBodyEmpty() && m_Mode == NewMessageMode)
+    {
+        showNoRecipPopup();
+        return;
+    }
+    else
+    {
+        saveDraftMsg();
+        getParent().pop();
+    }
 }
 
 void Conversation::onHwMoreButtonClicked()
@@ -682,6 +741,49 @@ void Conversation::onMsgSendErrorButtonClicked(Popup &popup, int buttonId)
     popup.destroy();
 }
 
+void Conversation::onNoRecipCancelButtonClicked(Popup &popup, int buttonId)
+{
+    m_pBody->setFocus(true);
+    popup.destroy();
+}
+
+void Conversation::onNoRecipDiscardButtonClicked(Popup &popup, int buttonId)
+{
+    if(isDefferedCmd())
+    {
+        if(m_DefferedCmd.defaultCmd)
+        {   // If we came from notification menu and unread threads will be more than one, we should to go back on thread list view
+            if(m_DefferedCmd.defaultCmd->getDefaultType() == AppControlDefault::NotificationType && getMsgEngine().getStorage().getUnreadThreadCount() > 1)
+            {
+                getParent().pop();
+            }
+            else
+            {   // Go to needed conversation
+                MessageRef msg = getMsgEngine().getStorage().getMessage(m_DefferedCmd.defaultCmd->getMessageId());
+                if(msg)
+                    setThreadId(msg->getThreadId());
+                if(m_DefferedCmd.defaultCmd->getDefaultType() == AppControlDefault::ReplyType)
+                    m_pBody->setFocus(true);
+            }
+        }
+        else if(m_DefferedCmd.composeCmd)
+        {   // Go to needed conversation
+            setThreadId(ThreadId());
+            if(m_pRecipPanel)
+                m_pRecipPanel->execCmd(m_DefferedCmd.composeCmd);
+            if(m_pBody)
+                m_pBody->execCmd(m_DefferedCmd.composeCmd);
+        }
+        resetDefferedCmd();
+    }
+    else
+    {   // We will get here from conversation after tap on Back Button
+        getParent().pop();
+    }
+
+    popup.destroy();
+}
+
 void Conversation::onDeleteItemPressed(ContextPopupItem &item)
 {
     MSG_LOG("");
index 8b3f2ba..a8b3ff1 100644 (file)
@@ -1,86 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.message" version="0.1.0">
-       <label>Message</label>
-       <description>Message Application</description>
-        <ui-application appid="org.tizen.message" exec="/usr/apps/org.tizen.message/bin/message" launch_mode="single" nodisplay="false" multiple="false" type="capp" taskmanage="true" indicatordisplay="true" process-pool="true" hw-acceleration="use-GL">
-               <metadata key="http://developer.samsung.com/tizen/metadata/multiwindow"/>
-               <metadata key="http://developer.samsung.com/tizen/metadata/largememory"/>
-               <icon>/usr/share/icons/default/small/message.png</icon>
-               <label>Messages</label>
-               <label xml:lang="ar-ae">الرسائل</label>
-               <label xml:lang="as-in">মেছেজসমূহ</label>
-               <label xml:lang="az-az">Mesajlar</label>
-               <label xml:lang="bn-in">বার্তাসমূহ</label>
-               <label xml:lang="bg-bg">Съобщения</label>
-               <label xml:lang="ca-es">Missatges</label>
-               <label xml:lang="cs-cz">Zprávy</label>
-               <label xml:lang="da-dk">Meddelelser</label>
-               <label xml:lang="de-de">Nachrichten</label>
-               <label xml:lang="el-gr">Μηνύματα</label>
-               <label xml:lang="en-gb">Messages</label>
-               <label xml:lang="en-ph">Messages</label>
-               <label xml:lang="en-us">Messages</label>
-               <label xml:lang="es-es">Mensajes</label>
-               <label xml:lang="es-mx">Mensajes</label>
-               <label xml:lang="et-ee">Sõnumid</label>
-               <label xml:lang="eu-es">Mezuak</label>
-               <label xml:lang="fi-fi">Viestit</label>
-               <label xml:lang="fr-ca">Messages</label>
-               <label xml:lang="fr-fr">Messages</label>
-               <label xml:lang="ga-ie">Teachtaireachtaí</label>
-               <label xml:lang="gu-in">સંદેશા</label>
-               <label xml:lang="gl-es">Mensaxes</label>
-               <label xml:lang="hi-in">सन्देश</label>
-               <label xml:lang="hr-hr">Poruke</label>
-               <label xml:lang="hu-hu">Üzenetek</label>
-               <label xml:lang="hy-am">Հղրդգրթ</label>
-               <label xml:lang="id-id">Pesan</label>
-               <label xml:lang="is-is">Skilaboð</label>
-               <label xml:lang="it-it">Messaggi</label>
-               <label xml:lang="ja-jp">メッセージ</label>
-               <label xml:lang="ka-ge">შეტყობინებები</label>
-               <label xml:lang="kk-kz">Хабарламалар</label>
-               <label xml:lang="km-kh">សារ</label>
-               <label xml:lang="kn-in">ಸಂದೇಶಗಳು</label>
-               <label xml:lang="ko-kr">메시지</label>
-               <label xml:lang="lo-la">ຂໍ້ຄວາມ</label>
-               <label xml:lang="lt-lt">Žinutės</label>
-               <label xml:lang="lv-lv">Ziņas</label>
-               <label xml:lang="mk-mk">Пораки</label>
-               <label xml:lang="ml-in">സന്ദേശങ്ങൾ</label>
-               <label xml:lang="mr-in">संदेश</label>
-               <label xml:lang="ms-my">Mesej</label>
-               <label xml:lang="my-mm">မက္ေဆ့ခ်္မ်ား</label>
-               <label xml:lang="nb-no">Meldinger</label>
-               <label xml:lang="ne-np">संदेशहरू</label>
-               <label xml:lang="nl-nl">Berichten</label>
-               <label xml:lang="or-in">ସନ୍ଦେଶଗୁଡିକ</label>
-               <label xml:lang="pa-in">ਸੰਦੇਸ਼</label>
-               <label xml:lang="pl-pl">Wiadomości</label>
-               <label xml:lang="pt-br">Mensagens</label>
-               <label xml:lang="pt-pt">Mensagem</label>
-               <label xml:lang="ro-ro">Mesaje</label>
-               <label xml:lang="ru-ru">Сообщения</label>
-               <label xml:lang="si-lk">පණිවිඩ</label>
-               <label xml:lang="sk-sk">Správy</label>
-               <label xml:lang="sl-si">Sporočila</label>
-               <label xml:lang="sr-rs">Poruke</label>
-               <label xml:lang="sv-se">Meddelanden</label>
-               <label xml:lang="ta-in">தகவல்கள்</label>
-               <label xml:lang="te-in">సందేశాలు</label>
-               <label xml:lang="th-th">ข้อความ</label>
-               <label xml:lang="tr-tr">Mesajlar</label>
-               <label xml:lang="tl-ph">Mga Mensahe</label>
-               <label xml:lang="uk-ua">Повідомлення</label>
-               <label xml:lang="ur-pk">پیغامات</label>
-               <label xml:lang="uz-uz">Xabarlar</label>
-               <label xml:lang="vi-vn">Tin nhắn</label>
-               <label xml:lang="zh-cn">信息</label>
-               <label xml:lang="zh-hk">訊息</label>
-               <label xml:lang="zh-sg">讯息</label>
-               <label xml:lang="zh-tw">訊息</label>
-       </ui-application>
-    <ui-application appid="org.tizen.message.compose" exec="/usr/apps/org.tizen.message/bin/message" launch_mode="group" nodisplay="true" multiple="true" type="capp" taskmanage="false" process-pool="true" hw-acceleration="use-GL">
+    <label>Message</label>
+    <description>Message Application</description>
+    <ui-application appid="org.tizen.message" exec="/usr/apps/org.tizen.message/bin/message" launch_mode="caller" nodisplay="false" multiple="false" type="capp" taskmanage="true" hw-acceleration="use-GL">
         <metadata key="http://developer.samsung.com/tizen/metadata/multiwindow"/>
         <metadata key="http://developer.samsung.com/tizen/metadata/multiwindow/nodisplay"/>
         <icon>/usr/share/icons/default/small/message.png</icon>
         </app-control>
     </ui-application>
         <privileges>
-               <privilege>http://tizen.org/privilege/location</privilege>
-               <privilege>http://tizen.org/privilege/datasharing</privilege>
-               <privilege>http://tizen.org/privilege/network.get</privilege>
-               <privilege>http://tizen.org/privilege/wifidirect</privilege>
-               <privilege>http://tizen.org/privilege/callhistory.read</privilege>
-               <privilege>http://tizen.org/privilege/contact.write</privilege>
-               <privilege>http://tizen.org/privilege/power</privilege>
-               <privilege>http://tizen.org/privilege/content.write</privilege>
-               <privilege>http://tizen.org/privilege/message.write</privilege>
-               <privilege>http://tizen.org/privilege/push</privilege>
-               <privilege>http://tizen.org/privilege/account.read</privilege>
-               <privilege>http://tizen.org/privilege/externalstorage</privilege>
-               <privilege>http://tizen.org/privilege/recorder</privilege>
-               <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
-               <privilege>http://tizen.org/privilege/mediastorage</privilege>
-               <privilege>http://tizen.org/privilege/internet</privilege>
-               <privilege>http://tizen.org/privilege/nfc.cardemulation</privilege>
-               <privilege>http://tizen.org/privilege/calendar.write</privilege>
-               <privilege>http://tizen.org/privilege/window.priority.set</privilege>
-               <privilege>http://tizen.org/privilege/volume.set</privilege>
-               <privilege>http://tizen.org/privilege/callhistory.write</privilege>
-               <privilege>http://tizen.org/privilege/alarm.set</privilege>
-               <privilege>http://tizen.org/privilege/call</privilege>
-               <privilege>http://tizen.org/privilege/email</privilege>
-               <privilege>http://tizen.org/privilege/contact.read</privilege>
-               <privilege>http://tizen.org/privilege/systemsettings</privilege>
-               <privilege>http://tizen.org/privilege/shortcut</privilege>
-               <privilege>http://tizen.org/privilege/keymanager</privilege>
-               <privilege>http://tizen.org/privilege/camera</privilege>
-               <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
-               <privilege>http://tizen.org/privilege/led</privilege>
-               <privilege>http://tizen.org/privilege/display</privilege>
-               <privilege>http://tizen.org/privilege/alarm.get</privilege>
-               <privilege>http://tizen.org/privilege/network.profile</privilege>
-               <privilege>http://tizen.org/privilege/calendar.read</privilege>
-               <privilege>http://tizen.org/privilege/account.write</privilege>
-               <privilege>http://tizen.org/privilege/nfc</privilege>
-               <privilege>http://tizen.org/privilege/bluetooth</privilege>
-               <privilege>http://tizen.org/privilege/network.set</privilege>
-               <privilege>http://tizen.org/privilege/notification</privilege>
-               <privilege>http://tizen.org/privilege/externalstorage.appdata</privilege>
-               <privilege>http://tizen.org/privilege/haptic</privilege>
-               <privilege>http://tizen.org/privilege/download</privilege>
-               <privilege>http://tizen.org/privilege/message.read</privilege>
-               <privilege>http://tizen.org/privilege/telephony</privilege>
+        <privilege>http://tizen.org/privilege/location</privilege>
+        <privilege>http://tizen.org/privilege/datasharing</privilege>
+        <privilege>http://tizen.org/privilege/network.get</privilege>
+        <privilege>http://tizen.org/privilege/wifidirect</privilege>
+        <privilege>http://tizen.org/privilege/callhistory.read</privilege>
+        <privilege>http://tizen.org/privilege/contact.write</privilege>
+        <privilege>http://tizen.org/privilege/power</privilege>
+        <privilege>http://tizen.org/privilege/content.write</privilege>
+        <privilege>http://tizen.org/privilege/message.write</privilege>
+        <privilege>http://tizen.org/privilege/push</privilege>
+        <privilege>http://tizen.org/privilege/account.read</privilege>
+        <privilege>http://tizen.org/privilege/externalstorage</privilege>
+        <privilege>http://tizen.org/privilege/recorder</privilege>
+        <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+        <privilege>http://tizen.org/privilege/mediastorage</privilege>
+        <privilege>http://tizen.org/privilege/internet</privilege>
+        <privilege>http://tizen.org/privilege/nfc.cardemulation</privilege>
+        <privilege>http://tizen.org/privilege/calendar.write</privilege>
+        <privilege>http://tizen.org/privilege/window.priority.set</privilege>
+        <privilege>http://tizen.org/privilege/volume.set</privilege>
+        <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+        <privilege>http://tizen.org/privilege/alarm.set</privilege>
+        <privilege>http://tizen.org/privilege/call</privilege>
+        <privilege>http://tizen.org/privilege/email</privilege>
+        <privilege>http://tizen.org/privilege/contact.read</privilege>
+        <privilege>http://tizen.org/privilege/systemsettings</privilege>
+        <privilege>http://tizen.org/privilege/shortcut</privilege>
+        <privilege>http://tizen.org/privilege/keymanager</privilege>
+        <privilege>http://tizen.org/privilege/camera</privilege>
+        <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+        <privilege>http://tizen.org/privilege/led</privilege>
+        <privilege>http://tizen.org/privilege/display</privilege>
+        <privilege>http://tizen.org/privilege/alarm.get</privilege>
+        <privilege>http://tizen.org/privilege/network.profile</privilege>
+        <privilege>http://tizen.org/privilege/calendar.read</privilege>
+        <privilege>http://tizen.org/privilege/account.write</privilege>
+        <privilege>http://tizen.org/privilege/nfc</privilege>
+        <privilege>http://tizen.org/privilege/bluetooth</privilege>
+        <privilege>http://tizen.org/privilege/network.set</privilege>
+        <privilege>http://tizen.org/privilege/notification</privilege>
+        <privilege>http://tizen.org/privilege/externalstorage.appdata</privilege>
+        <privilege>http://tizen.org/privilege/haptic</privilege>
+        <privilege>http://tizen.org/privilege/download</privilege>
+        <privilege>http://tizen.org/privilege/message.read</privilege>
+        <privilege>http://tizen.org/privilege/telephony</privilege>
         </privileges>
-</manifest>
+</manifest>
\ No newline at end of file