pImpl->_path = path;
pImpl->_appId = aId;
- pImpl->_opId = oId;
+ pImpl->_opId = (oId.IsEmpty()) ? TIZEN_OPERATION_MAIN : oId;
pImpl->_property = prop;
return pAc;
req = _AppControlManager::GetInstance()->__inAppManager.InsertItem(pItem);
}
- if (_ThreadImpl::GetCurrentThreadImpl()->GetThreadType() == THREAD_TYPE_EVENT_DRIVEN)
+ const _ThreadImpl* pThreadImpl = _ThreadImpl::GetCurrentThreadImpl();
+ if (pThreadImpl && pThreadImpl->GetThreadType() == THREAD_TYPE_EVENT_DRIVEN)
{
_AppControlResponseEvent* pAppControlResponseEvent = new (std::nothrow) _AppControlResponseEvent();
}
-static bool
-IsValidAppControl(const String& appcontrolID)
-{
- return ((appcontrolID == L"osp.appcontrol.provider.audio")
- || (appcontrolID == L"osp.appcontrol.provider.bluetooth")
- || (appcontrolID == L"osp.appcontrol.provider.calendar")
- || (appcontrolID == L"osp.appcontrol.provider.camera")
- || (appcontrolID == L"osp.appcontrol.provider.contact")
- || (appcontrolID == L"osp.appcontrol.provider.certificatemanager")
- || (appcontrolID == L"osp.appcontrol.provider.email")
- || (appcontrolID == L"osp.appcontrol.provider.image")
- || (appcontrolID == L"osp.appcontrol.provider.media")
- || (appcontrolID == L"osp.appcontrol.provider.message")
- || (appcontrolID == L"osp.appcontrol.provider.video")
- || (appcontrolID == L"osp.appcontrol.provider.imageeditor")
- || (appcontrolID == L"osp.appcontrol.provider.allshare")
- || (appcontrolID == L"tizen.filemanager")
- || (appcontrolID == L"tizen.camera")
- || (appcontrolID == L"tizen.gallery")
- || (appcontrolID == L"tizen.imageviewer")
- || (appcontrolID == L"tizen.videoplayer")
- || (appcontrolID == L"tizen.memo")
- || (appcontrolID == L"tizen.contacts")
- || (appcontrolID == L"tizen.calendar")
- || (appcontrolID == L"tizen.todo")
- || (appcontrolID == L"tizen.email")
- || (appcontrolID == L"tizen.settings")
- || (appcontrolID == L"tizen.messages")
- || (appcontrolID == L"tizen.musicplayer")
- || (appcontrolID == L"tizen.bluetooth")
- || (appcontrolID == L"samsung.snote")
- || (appcontrolID == L"0pnxz8hbsr.MyFiles")
- || (appcontrolID == L"hdufar9ycj.Camera")
- || (appcontrolID == L"ijudt7w61q.Gallery")
- || (appcontrolID == L"jysyv9o1dc.ImageViewer")
- || (appcontrolID == L"npwf0scb88.VideoPlayer")
- || (appcontrolID == L"zunqjlsnce.Memo")
- || (appcontrolID == L"f9uev8hsyo.Contacts")
- || (appcontrolID == L"ph1vq2phrp.Calendar")
- || (appcontrolID == L"vxqbrefica.Email")
- || (appcontrolID == L"kto5jikgul.Settings")
- || (appcontrolID == L"8r4r5ddzzn.Messages")
- || (appcontrolID == L"dhrul6qzj3.MusicPlayer")
- || (appcontrolID == L"smemo-efl"));
-}
-
result
_AppControlImpl::Stop(void)
{
- const String appcontrolID(GetAppControlProviderId());
- SysTryReturnResult(NID_APP, IsValidAppControl(appcontrolID), E_INVALID_OPERATION, "Invalid appcontrolID(%ls)", appcontrolID.GetPointer());
-
+ result r = E_SUCCESS;
result (*pStop)(int req) = null;
if (_reqId != APPCONTROL_REQUEST_ID_INVALID)
if (pInfo->pProvider)
{
- pInfo->pProvider->StopAppControlPlugin(_reqId);
+ r = pInfo->pProvider->StopAppControlPlugin(_reqId);
}
_AppControlManager::GetInstance()->__inAppManager.RemoveItem(_reqId);
_IAppControlPluginProvider* pProvider = GetAppControlPluginProvider(_path);
if (pProvider)
{
- pProvider->StopAppControlPlugin(-1);
- SysLog(NID_APP, "Request is stopped.");
+ r = pProvider->StopAppControlPlugin(-1);
pProvider->Release();
}
}
- return E_SUCCESS;
+ SysLog(NID_APP, "[%s] Request is stopped.", GetErrorMessage(r));
+
+ return r;
}
String
if (_appName.IsEmpty())
{
AppId appId = GetAppId();
- AppId aliasAppId = _AppControlRegistry::GetInstance()->GetAliasAppId(appId);
+ const AppId& aliasAppId = _AppControlRegistry::GetInstance()->GetAliasAppId(appId);
if (!aliasAppId.IsEmpty())
{
appId = aliasAppId;
}
+ appId = _Aul::GetRealAppId(appId);
+
std::unique_ptr<PackageAppInfo> pInfo(_PackageManagerImpl::GetInstance()->GetPackageAppInfoN(appId));
if (pInfo.get())
{
- SysLog(NID_APP, "PackageInfo of appId(%ls) exists", appId.GetPointer());
- const String& name = pInfo->GetAppName();
- if (name == String(SUBMODE_NAME))
- {
- // workaround for special case: requery with actual appId
- const PackageId& packageId = _PackageManagerImpl::GetPackageIdByAppId(appId);
- const String& defaultName = _PackageManagerImpl::GetInstance()->GetDefaultAppExecutableName(packageId);
-
- const String& convertedAppId = packageId + L'.' + defaultName;
-
- std::unique_ptr<PackageAppInfo> pNewInfo(_PackageManagerImpl::GetInstance()->GetPackageAppInfoN(convertedAppId));
-
- if (pNewInfo.get())
- {
- _appName = pNewInfo->GetAppDisplayName();
- }
- else
- {
- SysLog(NID_APP, "No default applicaiton information, possible database error.");
- }
- }
- else
- {
- _appName = pInfo->GetAppDisplayName();
- }
+ SysLog(NID_APP, "PackageInfo of [%ls] exists.", appId.GetPointer());
+ _appName = pInfo->GetAppDisplayName();
}
else
{
- SysLog(NID_APP, "PackageInfo of appId(%ls) does not exist", appId.GetPointer());
+ SysLog(NID_APP, "PackageInfo of [%ls] does not exist.", appId.GetPointer());
}
}
AppId appId = GetAppId();
SysTryReturn(NID_APP, !appId.IsEmpty(), null, E_SYSTEM, "[E_SYSTEM] Empty appId.");
- AppId aliasAppId = _AppControlRegistry::GetInstance()->GetAliasAppId(appId);
+ const AppId& aliasAppId = _AppControlRegistry::GetInstance()->GetAliasAppId(appId);
if (!aliasAppId.IsEmpty())
{
appId = aliasAppId;
{
if(pEventArg->GetType() == _APPCONTROL_RESPONSETYPE_COMPLETE)
{
- _AppControlManager::InvokeAppControlCompleteListener(*pResponseListener, pEventArg->GetAppId(), pEventArg->GetOperationId(), pEventArg->GetAppControlResult(), pEventArg->GetExtraData(), pEventArg->IsSubMode());
+ _AppControlManager::InvokeAppControlCompleteListener(*pResponseListener, pEventArg->GetAppId(), pEventArg->GetOperationId(), pEventArg->GetAppControlResult(), pEventArg->GetExtraData(), pEventArg->IsRaiseMode());
_AppControlResponseEvent* pResponseEvent = null;
_AppControlManager::GetInstance()->GetAppControlResponseEventContainer()->GetValue(pEventArg->GetRequestId(), pResponseEvent);