bool
CallAppControlRequestMgr::LaunchComposeMessageAppControl(String& contactNumber, IAppControlResponseListener* pListener)
{
+ String tempContactNumber;
+ int commaIndex = 0;
+ int semiColonIndex = 0;
+ int index = 0;
+ contactNumber.IndexOf(",", 0, commaIndex);
+ contactNumber.IndexOf(";", 0, semiColonIndex);
+
+ if(commaIndex != -1 && semiColonIndex != -1)
+ {
+ index = commaIndex < semiColonIndex ? commaIndex : semiColonIndex;
+ }
+ else if(commaIndex != -1 || semiColonIndex != -1)
+ {
+ index = commaIndex > semiColonIndex ? commaIndex : semiColonIndex;
+ }
+ else
+ {
+ index = contactNumber.GetLength();
+ }
+ contactNumber.SubString(0, index, tempContactNumber);
+
if (__pOpenedAppControl != null)
{
//An AppControl is already running.
HashMap extraData;
extraData.Construct();
extraData.Add(new (std::nothrow) String(MESSAGE_TYPE), new (std::nothrow) String(MESSAGE_SMS_TYPE));
- extraData.Add(new (std::nothrow) String(MESSAGE_TO), new (std::nothrow) String(contactNumber));
+ extraData.Add(new (std::nothrow) String(MESSAGE_TO), new (std::nothrow) String(tempContactNumber));
__pOpenedAppControl = AppManager::FindAppControlN(PROVIDER_ID_MESSAGE, OPERATION_ID_COMPOSE);
if (__pOpenedAppControl != null)