Fix for N_SE-43710 N_SE-43908
authorAmith Kumar Mahale <amith.m@samsung.com>
Sat, 29 Jun 2013 12:30:58 +0000 (18:00 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Sat, 29 Jun 2013 12:30:58 +0000 (18:00 +0530)
Change-Id: I444ce26a0edc62969c26fb00af21315fe548992f
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
inc/PhnCallLogViewByPopup.h
inc/PhnTabDialer.h
inc/PhnTypes.h
manifest.xml
res/eng-GB.xml
res/screen-size-normal/IDL_CALL_LOG_VIEWBY_POPUP.xml
src/PhnCallLogViewByPopup.cpp
src/PhnTabDialer.cpp
src/PhnTabLogs.cpp
src/PhnTypes.cpp

index 3a154b2..4c8bfd3 100644 (file)
@@ -47,6 +47,7 @@ public:
        virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
        virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
        virtual int GetItemCount(void);
+       void UpdateViewByPopupList();
 
        result ConstructViewbyPopup();
        result ConstructBlockPopup(Tizen::Base::String& phoneNumber, bool isCallRejected, bool isMsgBeRejected);
@@ -91,6 +92,7 @@ private:
        Tizen::Ui::Controls::Button* __pButtonCancel;
        Tizen::Ui::Controls::Button* __pButtonBlockOk;
        Tizen::Ui::Controls::Button* __pButtonBlockCancel;
+       ListView* __pListView;
 
        bool __isBlockCallSelected;
        bool __isBlockMessageSelected;
index 7535aeb..97d45f5 100644 (file)
@@ -119,6 +119,8 @@ protected:
        void ShowCallContextMenu(Tizen::Base::String& contactNumber);
        //Used to check if App is in foreground.
        bool IsForeground();
+       //Used to show silent mode message box
+       void ShowSilentModeToggle(bool bEnabled);
 
        virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
index d1d910f..c198a9c 100644 (file)
@@ -127,6 +127,8 @@ extern const wchar_t* IDB_LOG_MORE_PRESSED_ICON;
 extern const wchar_t* IDS_DIALER_MOBILE_STR;
 extern const wchar_t* IDS_DIALER_SPEEDDIAL_POPUP_MSG;
 extern const wchar_t* IDS_DIALER_SPEEDDIAL_POPUP_TITLE_MSG;
+extern const wchar_t* IDS_DIALER_VOICE_POPUP_MSG;
+extern const wchar_t* IDS_DIALER_VOICE_POPUP_TITLE_MSG;
 extern const wchar_t* IDS_SPEEDDIAL_POP_YES_BTN_STRING;
 extern const wchar_t* IDS_SPEEDDIAL_POP_NO_BTN_STRING;
 extern const wchar_t* IDS_DIALER_MENU_ITEM_SEND_MSG;
@@ -295,6 +297,8 @@ extern const wchar_t* IDS_SETTING_SET_BARRING_PWD_TITLE;
 extern const wchar_t* IDS_SETTING_EDIT_REJECT_MSG_TITLE;
 extern const wchar_t* IDS_SPEED_DIAL_INVALID_CONTACT;
 extern const wchar_t* IDS_SPEED_DIAL_INVALID_CONTACT_OK;
+extern const wchar_t* IDS_SILENT_MODE_ENABLED;
+extern const wchar_t* IDS_SILENT_MODE_DISABLED;
 
 //control name
 extern const wchar_t* IDC_GROUPEDTABLEVIEW;
index 7b07b9b..0672a2f 100644 (file)
@@ -9,7 +9,7 @@
         <Feature Name="http://tizen.org/feature/platform.core.fpu.arch.vfpv3">true</Feature>
     </Requirements>
     <Apps>
-        <ApiVersion>2.1</ApiVersion>
+        <ApiVersion>2.2</ApiVersion>
         <Privileges>
             <Privilege>http://tizen.org/privilege/application.launch</Privilege>
             <Privilege>http://tizen.org/privilege/appusage</Privilege>
index 84c2e21..1d2e008 100644 (file)
     <text id="IDS_SETTING_SET_BARRING_PWD_LABEL_STRING">Enter Password</text>
     <text id="IDS_DIALER_KEYPAD_STRING">Keypad</text>
     <text id="IDS_DIALER_LOGS_STRING">Logs</text>
+    <text id="IDS_SILENT_MODE_ENABLED">Silent Mode Enabled</text>
+    <text id="IDS_SILENT_MODE_DISABLED">Silent Mode Disabled</text>
+    <text id="IDS_DIALER_VOICE_POPUP_MSG">Assign now?</text>
+    <text id="IDS_DIALER_VOICE_POPUP_TITLE_MSG">No Voice Mail Assigned.</text>
 </string_table>
index d93a0fb..ca80815 100644 (file)
@@ -3,15 +3,15 @@
        This XML file was automatically generated by UiBuilder - do not modify by hand.
 -->
 <!DOCTYPE ScenePopup SYSTEM "UIForm.dtd">
-<ScenePopup Bversion="2.0.0.201303182057" Dversion="20120315">
+<ScenePopup Bversion="2.0.0.201306281023" Dversion="20120315">
     <Popup id="IDL_CALL_LOG_VIEWBY_POPUP">
         <property accessibilityHint="" color="" titleText="" titleTextColor=""/>
-        <layout height="520.0" mode="Portrait" style="" type="LAYOUT_RELATIVE" width="600.0"/>
-        <layout height="520.0" mode="Landscape" style="" type="LAYOUT_RELATIVE" width="600.0"/>
+        <layout height="573.0" mode="Portrait" style="" type="LAYOUT_RELATIVE" width="600.0"/>
+        <layout height="573.0" mode="Landscape" style="" type="LAYOUT_RELATIVE" width="600.0"/>
     </Popup>
     <Label id="IDC_POPUP_TITLE" parent="IDL_CALL_LOG_VIEWBY_POPUP">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="View by" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="93.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_LOG_VIEWBY_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CALL_LOG_VIEWBY_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CALL_LOG_VIEWBY_POPUP" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="0.0"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="93.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_LOG_VIEWBY_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_LOG_VIEWBY_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CALL_LOG_VIEWBY_POPUP" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="0.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="125.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_LOG_VIEWBY_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CALL_LOG_VIEWBY_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CALL_LOG_VIEWBY_POPUP" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="600.0" x="0.0" y="0.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="125.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_LOG_VIEWBY_POPUP" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_LOG_VIEWBY_POPUP" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CALL_LOG_VIEWBY_POPUP" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="600.0" x="0.0" y="0.0"/>
     </Label>
 </ScenePopup>
index 8ee090f..1d0ebf1 100644 (file)
@@ -81,6 +81,7 @@ CallLogViewByPopup::CallLogViewByPopup(ICallLogViewByPopupListener& listener)
        __pBlockInfo = null;
        __isBlockCallSelected = false;
        __isBlockMessageSelected = false;
+       __pListView = null;
 }
 
 CallLogViewByPopup::~CallLogViewByPopup()
@@ -98,6 +99,7 @@ CallLogViewByPopup::ConstructViewbyPopup()
                return r;
        }
        SetPropagatedKeyEventListener(this);
+       AppUtility::GetGlobalFontAndItemHeight(&__fontSize, &__itemHeight);
        //show options
        __pOptionsList =  new (std::nothrow) ArrayList(SingleObjectDeleter);
        __pOptionsList->Construct();
@@ -117,34 +119,34 @@ CallLogViewByPopup::ConstructViewbyPopup()
        if(__pPopupTitle != null)
        {
                cmdString = AppUtility::GetResourceString(IDS_VIEWBY_POPUP_TITLE_STRING);
+               __pPopupTitle->SetTextConfig(__fontSize, LABEL_TEXT_STYLE_NORMAL);
                __pPopupTitle->SetText(cmdString);
        }
 
+       __pListView = new (std::nothrow) ListView();
+       __pListView->Construct(Rectangle(0, __pPopupTitle->GetHeight() + POPUP_TITLE_PADDING, W_POPUP, H_LIST), true, SCROLL_STYLE_FADE_OUT);
+       __pListView->AddListViewItemEventListener(*this);
+       __pListView->SetItemProvider(*this);
+       r = AddControl(__pListView);
+
        String strText;
        Application::GetInstance()->GetAppResource()->GetString(L"IDS_CANCEL", strText);
        Button* pCancelButton = new (std::nothrow) Button();
-       r = pCancelButton->Construct(Rectangle(((W_POPUP - W_CANCEL_BUTTON)/2)-25, H_POPUP_TITLE + POPUP_TITLE_PADDING + H_LIST + CANCEL_BUTTON_PADDING , W_CANCEL_BUTTON, H_CANCEL_BUTTON), strText);
+       r = pCancelButton->Construct(Rectangle(((W_POPUP - W_CANCEL_BUTTON)/2), __pPopupTitle->GetHeight() + POPUP_TITLE_PADDING + __pListView->GetHeight() + CANCEL_BUTTON_PADDING, W_CANCEL_BUTTON, H_CANCEL_BUTTON), strText);
        pCancelButton->SetActionId(IDA_CANCEL);
        pCancelButton->AddActionEventListener(*this);
        r = AddControl(pCancelButton);
        TryReturn(r == E_SUCCESS, r, "CallOptionPopup::AddControl() failed");
 
-       ListView* pListView = new (std::nothrow) ListView();
-       pListView->Construct(Rectangle(0, H_POPUP_TITLE + POPUP_TITLE_PADDING, W_POPUP, H_LIST), true, SCROLL_STYLE_FADE_OUT);
-       pListView->AddListViewItemEventListener(*this);
-       pListView->SetItemProvider(*this);
-       r = AddControl(pListView);
-
-       pListView->UpdateList();
-       pListView->SetItemChecked(__selectedViewByIndex, true);
-       pListView->Invalidate(true);
+       __pListView->UpdateList();
+       __pListView->SetItemChecked(__selectedViewByIndex, true);
+       __pListView->Invalidate(true);
        return r;
 }
 
 int
 CallLogViewByPopup::GetItemCount(void)
 {
-       AppUtility::GetGlobalFontAndItemHeight(&__fontSize, &__itemHeight);
        if (__pOptionsList != null)
        {
                return __pOptionsList->GetCount();
@@ -234,6 +236,16 @@ CallLogViewByPopup::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
        return true;
 }
 
+void
+CallLogViewByPopup::UpdateViewByPopupList()
+{
+       AppUtility::GetGlobalFontAndItemHeight(&__fontSize, &__itemHeight);
+       __pPopupTitle->SetTextConfig(__fontSize, LABEL_TEXT_STYLE_NORMAL);
+       __pPopupTitle->Invalidate(true);
+       __pListView->UpdateList();
+       __pListView->Invalidate(true);
+}
+
 result
 CallLogViewByPopup::ConstructBlockPopup(Tizen::Base::String& phoneNumber, bool isCallRejected, bool isMsgBeRejected)
 {
index 4a3c89a..2ab0e05 100644 (file)
@@ -48,7 +48,7 @@ using namespace Tizen::Telephony;
 using namespace Tizen::Base::Utility;
 
 //Constants
-const int H_SPEEDDIAL_POPUP = 300;
+const int H_SPEEDDIAL_POPUP = 350;
 const int W_SPEEDDIAL_POPUP = 720;
 const int H_POPUP_MSG_LABEL = 100;
 const int H_POPUP_BTN = 90;
@@ -96,6 +96,7 @@ const wchar_t* IDC_BUTTON_SEARCHICON = L"IDC_BUTTON_SEARCHICON";
 const wchar_t* IDC_LABEL_LASTROW_BG = L"IDC_LABEL_LASTROW_BG";
 const wchar_t* IDC_PANEL_DROPDOWN = L"IDC_PANEL_DROPDOWN";
 const wchar_t* IDC_PANEL_USE_CONTACT = L"IDC_PANEL_USE_CONTACT";
+const wchar_t* IDC_SPEED_DIAL_TXT_LABEL = L"IDC_SPEED_DIAL_TXT_LABEL";
 
 
 //Button Dimensions
@@ -1260,9 +1261,9 @@ DialTabDialer::OnLongPressGestureDetected(TouchLongPressGestureDetector& gesture
                                //enable or disable the phone silent mode.
                                result r = E_FAILURE;
                                r = SettingInfo::SetValue(title, !enabled);
-                               if(r == E_OBJ_NOT_FOUND)
+                               if(r == E_SUCCESS)
                                {
-                                       AppLog("Object not found");
+                                       ShowSilentModeToggle(!enabled);
                                }
                        }
                }
@@ -1478,6 +1479,9 @@ DialTabDialer::SwitchToSpeedDialForm(void)
 void
 DialTabDialer::ShowSpeedDialConfirmationPopup(bool isVoiceMail)
 {
+       String popupTitleMsg;
+       String popupMsg;
+       Label* pMsgLabel;
        if(__pConfirmationPopup == null)
        {
                FloatRectangle rect = GetBoundsF();
@@ -1485,12 +1489,11 @@ DialTabDialer::ShowSpeedDialConfirmationPopup(bool isVoiceMail)
                __pConfirmationPopup->Construct(true, FloatDimension(W_SPEEDDIAL_POPUP, H_SPEEDDIAL_POPUP));
 
                rect = __pConfirmationPopup->GetBoundsF();
-               Label* pMsgLabel = new (std::nothrow) Label();
-               String popupTitleMsg;
-               String popupMsg;
+               pMsgLabel = new (std::nothrow) Label();
                if(isVoiceMail == true)
                {
-                       popupMsg = AppUtility::GetResourceString(IDS_DIALER_VOICE_MAIL_POPUP_MSG);
+                       popupTitleMsg = AppUtility::GetResourceString(IDS_DIALER_VOICE_POPUP_TITLE_MSG);
+                       popupMsg = AppUtility::GetResourceString(IDS_DIALER_VOICE_POPUP_MSG);
                }
                else
                {
@@ -1501,6 +1504,8 @@ DialTabDialer::ShowSpeedDialConfirmationPopup(bool isVoiceMail)
                __pConfirmationPopup->SetPropagatedKeyEventListener(this);
                __pConfirmationPopup->Invalidate(true);
                pMsgLabel->Construct(Rectangle(0, IDI_PADDING, rect.width, H_POPUP_MSG_LABEL), popupMsg);
+               pMsgLabel->SetName(IDC_SPEED_DIAL_TXT_LABEL);
+               pMsgLabel->SetTextConfig(44,LABEL_TEXT_STYLE_NORMAL);
                pMsgLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
                pMsgLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
                __pConfirmationPopup->AddControl(*pMsgLabel);
@@ -1521,6 +1526,23 @@ DialTabDialer::ShowSpeedDialConfirmationPopup(bool isVoiceMail)
                pButtonNo->AddActionEventListener(*this);
                __pConfirmationPopup->AddControl(pButtonNo);
        }
+       else
+       {
+               if(isVoiceMail == true)
+               {
+                       popupTitleMsg = AppUtility::GetResourceString(IDS_DIALER_VOICE_POPUP_TITLE_MSG);
+                       popupMsg = AppUtility::GetResourceString(IDS_DIALER_VOICE_POPUP_MSG);
+               }
+               else
+               {
+                       popupTitleMsg = AppUtility::GetResourceString(IDS_DIALER_SPEEDDIAL_POPUP_TITLE_MSG);
+                       popupMsg = AppUtility::GetResourceString(IDS_DIALER_SPEEDDIAL_POPUP_MSG);
+               }
+               __pConfirmationPopup->SetTitleText(popupTitleMsg);
+               pMsgLabel = static_cast<Label*>(__pConfirmationPopup->GetControl(IDC_SPEED_DIAL_TXT_LABEL, true));
+               pMsgLabel->SetText(popupMsg);
+
+       }
        //Show Popup message
        __pConfirmationPopup->SetShowState(true);
        __pConfirmationPopup->Show();
@@ -1990,3 +2012,17 @@ DialTabDialer::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
        }
        return false;
 }
+
+void
+DialTabDialer::ShowSilentModeToggle(bool bEnabled)
+{
+       // Creates an instance of MessageBox
+       String message = (bEnabled ? AppUtility::GetResourceString(IDS_SILENT_MODE_ENABLED):AppUtility::GetResourceString(IDS_SILENT_MODE_DISABLED));
+       MessageBox silentMsgBox;
+
+       silentMsgBox.Construct(L"", message, MSGBOX_STYLE_NONE, 2000);
+       // Calls ShowAndWait() : Draws and Shows itself and processes events
+       SetFocus();
+       int modalResult;
+       silentMsgBox.ShowAndWait(modalResult);
+}
index 198b70f..04da798 100644 (file)
@@ -1071,6 +1071,10 @@ DialTabLogs::OnForeground(void)
                __fontSize = fontSize;
                __itemHeight = itemHeight;
                __plogsListView->UpdateList();
+               if(__pLogsViewbyPopup != null && __pLogsViewbyPopup->GetShowState() == true)
+               {
+                       __pLogsViewbyPopup->UpdateViewByPopupList();
+               }
        }
 }
 
index 903dd10..e6343d3 100644 (file)
@@ -126,6 +126,8 @@ const wchar_t* IDB_LOG_MORE_PRESSED_ICON = L"00_icon_more_press.png";
 const wchar_t* IDS_DIALER_MOBILE_STR = L"IDS_DIALER_MOBILE_STR";
 const wchar_t* IDS_DIALER_SPEEDDIAL_POPUP_MSG = L"IDS_DIALER_SPEEDDIAL_POPUP_MSG";
 const wchar_t* IDS_DIALER_SPEEDDIAL_POPUP_TITLE_MSG = L"IDS_DIALER_SPEEDDIAL_POPUP_TITLE_MSG";
+const wchar_t* IDS_DIALER_VOICE_POPUP_MSG = L"IDS_DIALER_VOICE_POPUP_MSG";
+const wchar_t* IDS_DIALER_VOICE_POPUP_TITLE_MSG = L"IDS_DIALER_VOICE_POPUP_TITLE_MSG";
 const wchar_t* IDS_SPEEDDIAL_POP_YES_BTN_STRING = L"IDS_SPEEDDIAL_POP_YES_BTN_STRING";
 const wchar_t* IDS_SPEEDDIAL_POP_NO_BTN_STRING = L"IDS_SPEEDDIAL_POP_NO_BTN_STRING";
 const wchar_t* IDS_DIALER_MENU_ITEM_SEND_MSG = L"IDS_DIALER_MENU_ITEM_SEND_MSG";
@@ -291,6 +293,8 @@ const wchar_t* IDS_SETTING_AUTO_AREA_CODE_TITLE = L"IDS_SETTING_AUTO_AREA_CODE_T
 const wchar_t* IDS_SETTING_ADD_REJECT_MSG_TITLE = L"IDS_SETTING_ADD_REJECT_MSG_TITLE";
 const wchar_t* IDS_SETTING_SET_BARRING_PWD_TITLE = L"IDS_SETTING_SET_BARRING_PWD_TITLE";
 const wchar_t* IDS_SETTING_EDIT_REJECT_MSG_TITLE = L"IDS_SETTING_EDIT_REJECT_MSG_TITLE";
+const wchar_t* IDS_SILENT_MODE_ENABLED = L"IDS_SILENT_MODE_ENABLED";
+const wchar_t* IDS_SILENT_MODE_DISABLED = L"IDS_SILENT_MODE_DISABLED";
 
 //control name for settings module
 const wchar_t* IDC_GROUPEDTABLEVIEW = L"IDC_GROUPEDTABLEVIEW";