Fix for 44593 42495
authorAmith Kumar Mahale <amith.m@samsung.com>
Wed, 3 Jul 2013 13:12:21 +0000 (18:42 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Wed, 3 Jul 2013 13:12:21 +0000 (18:42 +0530)
Change-Id: Ifa05a9b2fba95c77e3c190a1efa2b24d45da5103
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
inc/CallConfCallerListForm.h
inc/CallTypes.h
res/eng-GB.xml
res/screen-size-normal/IDL_END_CALL_FORM.xml
src/CallApp.cpp
src/CallConfCallerListForm.cpp
src/CallErrorMsgPopup.cpp
src/CallPresentationModel.cpp
src/CallTelephonyManager.cpp
src/CallTypes.cpp

index c29efbd..b9b70b8 100644 (file)
@@ -43,6 +43,7 @@ class ConfCallerListForm
        , public Tizen::Ui::Controls::IFormBackEventListener
        , public Tizen::Ui::Controls::ITableViewItemProvider
        , public Tizen::Ui::IOrientationEventListener
+       , public Tizen::Social::IAddressbookChangeEventListener
 {
 public:
        ConfCallerListForm(void);
@@ -70,6 +71,9 @@ public:
        virtual result OnDraw(void);
        // Handle change in conf call list
        void HandleParticipantsChanged(void);
+       //IAddressbookChangeEventListener
+       virtual void OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList);
+       virtual void OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList);
 
        virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
@@ -94,6 +98,7 @@ private:
        AppCallInfo* __pConfCallInfo;
        //Timer used to show call time
        Tizen::Base::Runtime::Timer* __pConfCallTimer;
+       Tizen::Social::Addressbook* __pAddressbook;
        Tizen::Ui::Controls::TableView* __pList;
        bool            __isCallSplit;
 };
index 1ad4d8b..4823829 100644 (file)
@@ -180,7 +180,7 @@ extern const wchar_t* IDS_REJECT_MESSAGE_CREATE;
 extern const wchar_t* IDS_VIEW_CONTACT;
 extern const wchar_t* IDS_INVALID_NUMBER;
 extern const wchar_t* IDS_NUMBER_UNKNOWN;
-extern const wchar_t* IDS_GPRS_NUMBER;
+extern const wchar_t* IDS_USSD_NUMBER;
 extern const wchar_t* IDS_CONFERENCE_CALL_STRING;
 //Panel
 extern const wchar_t* PANEL_DIALER;
@@ -442,7 +442,7 @@ enum ErrorCodes
        ERROR_BARRING_PWD_TOO_LONG,
        ERROR_FLIGHT_MODE_SET,
        ERROR_GENERAL,
-       ERROR_GPRS_NUMBER,
+       ERROR_USSD_NUMBER,
 };
 
 enum DialerRequestType
index 3bd20f7..8728fe0 100644 (file)
     <text id="IDS_DATETIME_JAN">Jan</text>
     <text id="IDS_SELECTED_ITEM_STRING">%d call log selected</text>
     <text id="IDS_NUMBER_UNKNOWN">Unknown</text>
-       <text id="IDS_GPRS_NUMBER">GPRS is not supported</text>
+       <text id="IDS_USSD_NUMBER">USSD is not supported</text>
        <text id="IDS_END_CALL_STRING">Call Ended</text>
        <text id="IDS_SWAP_BTN_NAME">Swap</text>
        <text id="IDS_CONF_TITLE_LABEL">Conference Call</text>
index abf80bd..f86a792 100644 (file)
@@ -3,7 +3,7 @@
        This XML file was automatically generated by UiBuilder - do not modify by hand.
 -->
 <!DOCTYPE Scene SYSTEM "UIForm.dtd">
-<Scene Bversion="2.0.0.201305162056" Dversion="20120315">
+<Scene Bversion="2.0.0.201307011454" Dversion="20120315">
     <LogicalCoordinate>720</LogicalCoordinate>
     <Form id="IDL_END_CALL_FORM">
         <property backgroundColor="#000000" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
     <Label id="IDC_CALLER1_BIGPHOTO_LABEL" parent="IDL_END_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
         <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="true" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="500.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_END_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
-        <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="660.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="720.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_END_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="0.0"/>
+        <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="720.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_END_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="0.0"/>
     </Label>
     <Label id="IDC_BACKGROUND_LABEL" parent="IDL_END_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="C01-1_end call_BG_01.png" backgroundColor="#000000" backgroundColorOpacity="50" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_END_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="0.0"/>
+        <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="220.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="500.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_END_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="0.0"/>
     </Label>
     <Label id="IDC_CALLER1_LABEL" parent="IDL_END_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="58.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
     <Label id="IDC_CALL_TIME_LABEL" parent="IDL_END_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="::IDS_END_CALL_STRING" textColor="#FF4800" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="177.0" x="519.0" y="99.0"/>
-        <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="16.0" marginLeft="0.0" marginRight="24.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="188.0" x="1068.0" y="98.0"/>
+        <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="16.0" marginLeft="0.0" marginRight="24.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="188.0" x="1068.0" y="158.0"/>
     </Label>
     <Label id="IDC_NUMBER1_LABEL" parent="IDL_END_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="38.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDC_CALL_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="471.0" x="24.0" y="99.0"/>
-        <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="16.0" marginLeft="24.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="484.0" x="584.0" y="92.0"/>
+        <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="16.0" marginLeft="24.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="484.0" x="584.0" y="152.0"/>
     </Label>
     <Label id="IDC_KEY_BG_LABEL" parent="IDL_END_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
         <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER1_BIGPHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="720.0"/>
-        <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="160.0"/>
+        <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="220.0"/>
     </Label>
 </Scene>
index 325bc6c..4b3de61 100644 (file)
@@ -441,7 +441,7 @@ CallApp::HandleDialCallAppControlRequest(RequestId reqId,const IMap* pArgsMap,co
                }
                delete pKey;
                //Check if its a valid number
-               if(CheckNumberIsValid(phoneNumber) == false)
+       /*      if(CheckNumberIsValid(phoneNumber) == false)
                {
                        //go back to previous scene if App was already running, else exit application.
                        if(__initialSceneId.IsEmpty() == true)
@@ -458,7 +458,7 @@ CallApp::HandleDialCallAppControlRequest(RequestId reqId,const IMap* pArgsMap,co
                                //and show current screen, if any calls is present.
                                return;
                        }
-               }
+               }*/
                //call type
                pKey = new (std::nothrow) String(PARAM_CALL_TYPE);
                if(pArgsMap->ContainsKey(*pKey) == true)
index 2ae1ee2..7f272bd 100644 (file)
@@ -104,6 +104,7 @@ ConfCallerListForm::ConfCallerListForm(void)
        __pConfCallInfo = null;
        __pConfCallTimer = null;
        __isCallSplit = false;
+       __pAddressbook = null;
 }
 
 ConfCallerListForm::~ConfCallerListForm(void)
@@ -330,6 +331,13 @@ ConfCallerListForm::OnSceneActivatedN(const SceneId& previousSceneId, const Scen
        __pConfCallInfo = __pCallPresentor->GetConferenceCallInfoN();
        AppLogDebug("Enter %x",__pConfCallInfo);
 
+       AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+       __pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+       if(__pAddressbook != null)
+       {
+               __pAddressbook->SetAddressbookChangeEventListener(this);
+       }
+
        //show active call timer
        ShowTimerInfo(IDC_CALL_TIME_LABEL, __pConfCallInfo->GetCallConnectTime());
 
@@ -364,6 +372,10 @@ ConfCallerListForm::OnSceneDeactivated(const SceneId& currentSceneId, const Scen
                delete __pConfCallTimer;
                __pConfCallTimer = null;
        }
+       if(__pAddressbook != null)
+       {
+               __pAddressbook->SetAddressbookChangeEventListener(null);
+       }
 }
 
 result
@@ -653,6 +665,18 @@ ConfCallerListForm::OnFormBackRequested(Form& source)
 }
 
 void
+ConfCallerListForm::OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList)
+{
+       __pList->UpdateTableView();
+}
+
+void
+ConfCallerListForm::OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList)
+{
+       //No implementation
+}
+
+void
 ConfCallerListForm::CreateItemAndAddActionListener( Button& splitButton,
                Button& endButton, Label& callerLabel, SplitConfCallerCmdIds splitCmdId,
                EndConfCallerCmdIds EndCmdId, const String& displayName)
@@ -762,7 +786,7 @@ ConfCallerListForm::CreateItem(int itemIndex, int itemWidth)
                pContactNo.Append(AppUtility::GetResourceString(IDS_NUMBER_UNKNOWN));
        }
        //fetch contact details based on phone number
-       String* pDisplayName = callInfo.FetchCallerNameN();
+       String* pDisplayName = callInfo.FetchLatestCallerNameN(pContactNo);
 
        if(pDisplayName != null)
        {
index 430fd1b..2f67392 100644 (file)
@@ -228,9 +228,9 @@ ErrorMsgPopup::FetchErrorMessage(int errorCode)
        }
        break;
 
-       case ERROR_GPRS_NUMBER:
+       case ERROR_USSD_NUMBER:
        {
-               msg.Append(AppUtility::GetResourceString(IDS_GPRS_NUMBER));
+               msg.Append(AppUtility::GetResourceString(IDS_USSD_NUMBER));
        }
        break;
 
index a190395..e91d6d0 100644 (file)
@@ -200,7 +200,7 @@ CallPresentationModel::DialCall(String& contactNumber, bool isEmergency)
        numberEndsWithHash = IfNumberEndsWithHash(contactNumber);
        if(numberEndsWithHash == true)
        {
-               __pTelEventListener->HandleTelephonyError(ERROR_GPRS_NUMBER);
+               __pTelEventListener->HandleTelephonyError(ERROR_USSD_NUMBER);
                return ;
        }
 
index b057fbe..f1dacba 100644 (file)
@@ -35,6 +35,7 @@ using namespace Tizen::Social;
 using namespace Tizen::System;
 using namespace Tizen::Base::Collection;
 using namespace Tizen::Telephony;
+using namespace Tizen::Base::Utility;
 
 const char* callEventList[] = {
                TAPI_NOTI_VOICE_CALL_STATUS_IDLE,
@@ -2378,6 +2379,19 @@ TelephonyManager::CheckValidTelePhoneNumber(const String& contactNumber)
        {
                r = E_FAILURE;
        }
+
+       //Pattern to compare all characters except 0-9 * # P ; , +
+       String phoneNumberPattern(L"[^0-9*#P,p+;]");
+       RegularExpression checkPhoneNumber;
+       checkPhoneNumber.Construct(phoneNumberPattern);
+       //If there is any character other than these listed above then display invalid number
+       bool resultMatch = checkPhoneNumber.Match(contactNumber,false);
+       //return false for patterns other than 0-9 * # P ; , +
+       if(resultMatch == true)
+       {
+               //return phone number is invalid
+               r = E_FAILURE;
+       }
        //TODO: check if valid phone number else return error message
        return r;
 }
index 8846999..244e52a 100644 (file)
@@ -177,7 +177,7 @@ const wchar_t* IDS_REJECT_MESSAGE_CREATE = L"IDS_REJECT_MESSAGE_CREATE";
 const wchar_t* IDS_VIEW_CONTACT = L"IDS_VIEW_CONTACT";
 const wchar_t* IDS_INVALID_NUMBER = L"IDS_INVALID_NUMBER";
 const wchar_t* IDS_NUMBER_UNKNOWN = L"IDS_NUMBER_UNKNOWN";
-const wchar_t* IDS_GPRS_NUMBER = L"IDS_GPRS_NUMBER";
+const wchar_t* IDS_USSD_NUMBER = L"IDS_USSD_NUMBER";
 const wchar_t* IDS_CONFERENCE_CALL_STRING = L"IDS_CONFERENCE_CALL_STRING";
 //Panel
 const wchar_t* PANEL_DIALER = L"PanelDialer";