2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 #include <sys/prctl.h>
20 #include <unique_ptr.h>
23 #include <calendar_service.h>
24 #include <calendar_types2.h>
27 #include <FBaseSysLog.h>
30 #include <FIo_RegistryImpl.h>
31 #include <FSys_EnvironmentImpl.h>
32 #include <FBase_StringConverter.h>
33 #include <FBaseRt_Process.h>
35 #include "FApp_AppInfo.h"
36 #include "FApp_AppManagerImpl.h"
37 #include "FApp_AppControlManager.h"
38 #include "FApp_CommunicationDispatcher.h"
39 #include "FApp_ContextManager.h"
40 #include "FApp_AppManagerStub.h"
41 #include "FApp_ConditionManagerStub.h"
42 #include "FSys_DeviceManagerService.h"
43 #include "FSys_SystemService.h"
44 #include "FSys_AlarmService.h"
45 #include "FSys_AccessoryManagerService.h"
46 #include "FApp_PackageManagerStub.h"
47 #include "FApp_NotificationManagerStub.h"
48 #include "FAppPkg_PackageManagerImpl.h"
49 #include "FIo_MmcStorageManagerStub.h"
50 #include "AppService.h"
53 using namespace Tizen::Base;
54 using namespace Tizen::Base::Runtime;
55 using namespace Tizen::Base::Collection;
56 using namespace Tizen::Io;
57 using namespace Tizen::System;
58 using namespace Tizen::App;
62 static const RequestId HANDLER_REQUEST_INSTALL_COMPLETE = 0;
63 static const RequestId HANDLER_REQUEST_UNINSTALL_COMPLETE = 1;
64 static const RequestId HANDLER_REQUEST_ID = 2;
65 static const RequestId HANDLER_REQUEST_ALARMID = 2;
67 const char _APP_PATH_FORMAT[] = "/opt/apps/0000000000/bin/%ls";
68 const char _HEARTBEAT_PATH[] = "/tmp/osp-initialized";
69 #ifndef VCONFKEY_APPSERVICE_STATUS
70 #define VCONFKEY_APPSERVICE_STATUS "memory/appservice/status"
76 AppService::AppService()
77 : __pCommunicationDispatcher(null)
79 , __pAppManagerStub(null)
80 , __pConditionManagerStub(null)
81 , __handlerThread(*this)
82 , __pDeviceManagerService(null)
83 , __pSystemService(null)
84 , __pAccessoryManagerService(null)
85 , __pAlarmService(null)
86 , __pPackageManagerStub(null)
87 , __pNotificationManagerStub(null)
88 , __pMmcStorageManagerStub(null)
90 SysLog(NID_APP, "Enter.");
97 SysLog(NID_APP, "Exit.");
100 AppService::~AppService()
102 SysLog(NID_APP, "Enter.");
104 vconf_set_int(VCONFKEY_APPSERVICE_STATUS, -1);
106 Tizen::App::Package::_PackageManagerImpl::GetInstance()->RemoveEventListener(this);
108 delete __pAppManagerStub;
109 delete __pConditionManagerStub;
110 delete __pPackageManagerStub;
111 delete __pNotificationManagerStub;
112 delete __pMmcStorageManagerStub;
114 delete __pContextMgr;
116 SysLog(NID_APP, "Exit.");
120 AppService::CreateInstance(void)
122 static AppService* pAppService = new (std::nothrow) AppService();
128 AppService::OnAppInitializing(AppRegistry& appRegistry)
130 SysLog(NID_APP, "Enter.");
132 result r = __handlerThread.Construct(THREAD_TYPE_EVENT_DRIVEN);
133 SysTryReturn(NID_APP, IsFailed(r) == false, false, r, "[%s] Event thread creation failure.", GetErrorMessage(r));
135 r = __handlerThread.Start();
136 SysTryReturn(NID_APP, IsFailed(r) == false, false, r, "[%s] Event thread Start failure.", GetErrorMessage(r));
138 SysLog(NID_APP, "Exit.");
143 AppService::OnAppInitialized(void)
145 SysLog(NID_APP, "Enter.");
147 _Aul::SetPowerOffNotiListener(OnPowerOffNotiReceived, this);
149 result r = _AppManagerImpl::GetInstance()->AddEventListener(*this);
150 SysAssertf(!IsFailed(r), "[%s] Failed to add event listener.", GetErrorMessage(r));
152 LaunchSecurityService();
153 LaunchChannelService();
154 // LaunchSystemServices();
155 // LaunchUserServices();
158 InitializeServices();
160 const String tmpPath = _HEARTBEAT_PATH;
162 (void) file.Construct(tmpPath, "w");
164 vconf_set_int(VCONFKEY_APPSERVICE_STATUS, 1);
165 SysLog(NID_APP, "Exit.");
170 AppService::OnPowerOffNotiReceived(void* pData)
172 SysLog(NID_APP, "'power_off_start' noti received from system-server with 0x%x.", pData);
174 AppService* pAppService = static_cast<AppService*>(pData);
177 SysLog(NID_APP, "osp-app-service is terminating now.");
178 pAppService->Terminate();
184 AppService::InitializeIpc(void)
186 SysLog(NID_APP, "Enter.");
187 result r = E_SUCCESS;
189 __pContextMgr = new (std::nothrow) _ContextManager();
190 SysAssert(__pContextMgr != null);
191 SysTryCatch(NID_APP, __pContextMgr != null,, E_OUT_OF_MEMORY, "failed to _ContextManager creation.");
193 r = __pContextMgr->Construct();
194 SysAssert(!IsFailed(r));
195 SysTryCatch(NID_APP, !IsFailed(r),, r, "[%s] Propagated.", GetErrorMessage(r));
197 __pAppManagerStub = new (std::nothrow) _AppManagerStub();
198 SysAssert(__pAppManagerStub != null);
199 SysTryCatch(NID_APP, __pAppManagerStub != null,, E_OUT_OF_MEMORY, "failed to _AppManagerStub creation.");
201 r = __pAppManagerStub->Construct(__pContextMgr);
202 SysAssert(!IsFailed(r));
203 SysTryCatch(NID_APP, !IsFailed(r),, r, "[%s] Propagated.", GetErrorMessage(r));
205 __pCommunicationDispatcher = _CommunicationDispatcher::GetInstance();
206 SysAssert(__pCommunicationDispatcher != null);
207 SysTryCatch(NID_APP, __pCommunicationDispatcher != null,, E_OUT_OF_MEMORY, "failed to _CommunicationDispatcher creation.");
209 SysLog(NID_APP, "Exit.");
213 SysLog(NID_APP, "Catch.");
215 delete __pAppManagerStub;
216 __pAppManagerStub = null;
218 delete __pContextMgr;
219 __pContextMgr = null;
221 SysAssertf(false, "IPC services initializing is failed.");
226 AppService::InitializeServices(void)
228 SysLog(NID_APP, "Enter.");
229 result r = E_SUCCESS;
231 __pConditionManagerStub = new (std::nothrow) _ConditionManagerStub();
232 SysAssert(__pConditionManagerStub != null);
233 SysTryCatch(NID_APP, __pConditionManagerStub != null,, E_OUT_OF_MEMORY, "failed to _ConditionManagerStub creation.");
235 r = __pConditionManagerStub->Construct();
236 SysAssert(!IsFailed(r));
237 SysTryCatch(NID_APP, !IsFailed(r),, r, "[%s] Propagated.", GetErrorMessage(r));
239 __pDeviceManagerService = _DeviceManagerService::GetInstance();
240 SysAssert( __pDeviceManagerService != null);
241 SysTryCatch(NID_APP, __pDeviceManagerService != null,, E_OUT_OF_MEMORY, "failed to _DeviceManagerService creation.");
243 __pSystemService = _SystemService::GetInstance();
244 SysAssert( __pSystemService != null);
245 SysTryCatch(NID_APP, __pSystemService != null,, E_OUT_OF_MEMORY, "failed to _SystemService creation.");
247 __pAlarmService = _AlarmService::GetInstance();
248 SysAssert( __pAlarmService != null);
249 SysTryCatch(NID_APP, __pAlarmService != null,, E_OUT_OF_MEMORY, "failed to _pAlarmService creation.");
251 __pAccessoryManagerService = _AccessoryManagerService::GetInstance();
252 SysAssert( __pAccessoryManagerService != null);
253 SysTryCatch(NID_APP, __pAccessoryManagerService != null,, E_OUT_OF_MEMORY, "failed to _AccessoryManagerService creation.");
255 __pPackageManagerStub = new (std::nothrow) _PackageManagerStub();
256 SysAssert(__pPackageManagerStub != null);
257 SysTryCatch(NID_APP, __pPackageManagerStub != null,, E_OUT_OF_MEMORY, "failed to _PackageManagerStub creation.");
259 r = __pPackageManagerStub->Construct();
260 SysAssert(!IsFailed(r));
261 SysTryCatch(NID_APP, !IsFailed(r),, r, "[%s] Propagated.", GetErrorMessage(r));
263 __pNotificationManagerStub = new (std::nothrow) _NotificationManagerStub();
264 SysAssert(__pNotificationManagerStub != null);
265 SysTryCatch(NID_APP, __pNotificationManagerStub != null,, E_OUT_OF_MEMORY, "failed to _pNotificationManagerStub creation.");
267 r = __pNotificationManagerStub->Construct();
268 SysAssert(!IsFailed(r));
269 SysTryCatch(NID_APP, !IsFailed(r),, r, "[%s] Propagated.", GetErrorMessage(r));
271 __pMmcStorageManagerStub = new (std::nothrow) _MmcStorageManagerStub();
272 SysAssert(__pMmcStorageManagerStub != null);
273 SysTryCatch(NID_APP, __pMmcStorageManagerStub != null,, E_OUT_OF_MEMORY, "failed to __pMmcStorageManagerStub creation.");
275 r = __pMmcStorageManagerStub->Construct();
276 SysAssert(!IsFailed(r));
277 SysTryCatch(NID_APP, !IsFailed(r),, r, "[%s] Propagated.", GetErrorMessage(r));
279 SysLog(NID_APP, "Exit.");
283 SysLog(NID_APP, "Catch.");
285 delete __pConditionManagerStub;
286 __pConditionManagerStub = null;
288 delete __pPackageManagerStub;
289 __pPackageManagerStub = null;
291 delete __pNotificationManagerStub;
292 __pNotificationManagerStub = null;
294 delete __pMmcStorageManagerStub;
295 __pNotificationManagerStub = null;
297 SysAssertf(false, "System services initializing is failed.");
302 AppService::SetOomAdj(int pid, int adj)
304 // set oom_adj to -17 for system service
305 result r = E_SUCCESS;
306 char buf[FILENAME_MAX];
309 snprintf(buf, FILENAME_MAX, "/proc/%d/oom_adj", pid);
310 fP = fopen(buf, "w");
311 SysTryReturnResult(NID_APP, fP != NULL, E_SYSTEM, "oom_adj change failed with %s.", strerror(errno));
313 fprintf(fP, "%d", adj);
320 AppService::CreateProcess(const String& appId)
322 SysTryReturn(NID_APP, appId.GetLength() > 10 && appId[10] == L'.', -1, E_INVALID_ARG, "[E_INVALID_ARG] Wrong appId %ls.", appId.GetPointer());
331 char path[FILENAME_MAX];
332 memset(path, '\0', FILENAME_MAX);
334 snprintf(path, FILENAME_MAX, _APP_PATH_FORMAT, appId.GetPointer() + 11);
336 int ret = wcstombs(path + strlen("/opt/apps/"), appId.GetPointer(), 10);
339 SysLogException(NID_APP, E_SYSTEM, "Launching service (%ls)(%s) failed with [%s].", appId.GetPointer(), path, strerror(errno));
343 SysLog(NID_APP, "Launching %s.", path);
345 int currentPid = getpid();
347 SetOomAdj(currentPid, -17); // set oom_adj to -17 for system service
349 prctl(PR_SET_PDEATHSIG, SIGTERM);
351 setpgid(currentPid, currentPid);
353 ret = execl(path, path, static_cast<char*>(NULL));
356 SysLogException(NID_APP, E_SYSTEM, "Launching service (%ls)(%s) failed with [%s].", appId.GetPointer(), path, strerror(errno));
365 AppService::LaunchSystemServices(void)
367 const wchar_t systemServiceRegPath[] = L"res/system-services.ini";
368 const String regKeyAppId = L"AppId";
369 const String regKeyPriority = L"Priority";
371 SysLog(NID_APP, "Enter.");
373 const String& systemListPath = _AppInfo::GetAppRootPath() + systemServiceRegPath;
375 result r = reg.Construct(systemListPath, REG_OPEN_READ_ONLY, null);
376 // SysTryReturn(NID_APP, !IsFailed(r), r, r, "");
379 SysLog(NID_APP, "failed to open registry '%ls'", systemListPath.GetPointer());
383 IList *pSections = null;
384 reg.GetSectionListN(&pSections);
385 SysTryReturn(NID_APP, pSections != null, false, E_SYSTEM, "[E_SYSTEM] GetSectionListN fails (%ls) ", systemListPath.GetPointer() );
387 String* pSecName = null;
389 String priorityValue;
390 std::unique_ptr<IEnumerator> pEnum(pSections->GetEnumeratorN());
391 SysTryCatch(NID_APP, pEnum != null, , E_SYSTEM, "[E_SYSTEM] pSections->GetEnumeratorN fails (%ls)", systemListPath.GetPointer() );
393 while (pEnum->MoveNext() == E_SUCCESS)
395 pSecName = static_cast<String*>(pEnum->GetCurrent());
396 if ( pSecName != null)
399 r = reg.GetValue(*pSecName, regKeyPriority, priorityValue);
400 if (!IsFailed(r) && priorityValue == L"High")
402 // channel and security service are launched by code already.
406 reg.GetValue(*pSecName, regKeyAppId, appIdValue);
408 int pid = CreateProcess(appIdValue);
411 SysLog(NID_APP, "System service(%ls) is launched as pid(%d).", appIdValue.GetPointer(), pid);
412 // __pContextMgr->Register(appIdValue, executableNameValue, pid, pid, true);
416 SysLog(NID_APP, "Failed to launch System service(%ls).", appIdValue.GetPointer());
422 pSections->RemoveAll(true);
425 SysLog(NID_APP, "Exit.");
429 pSections->RemoveAll(true);
435 AppService::LaunchChannelService(void)
437 SysLog(NID_APP, "Launching channel service...");
438 return CreateProcess(L"cp7ipabg4k.osp-channel-service" ) == E_SUCCESS;
442 AppService::LaunchSecurityService(void)
444 SysLog(NID_APP, "Launching security service...");
445 return CreateProcess(L"q7097a278m.osp-security-service" ) == E_SUCCESS;
449 AppService::LaunchUserServices(void)
451 SysLog(NID_APP, "Enter.");
453 IList* pAppIdList_ForLaunchOnBoot = Tizen::App::Package::_PackageManagerImpl::GetInstance()->GetFilteredAppIdListN(L"LaunchOnBoot", L"True");
454 if (pAppIdList_ForLaunchOnBoot == null)
456 SysLog(NID_APP, "No launch-on-boot entry.");
460 result r = E_SUCCESS;
461 String* pPackageNameStr = null;
462 char* pPackageName = null;
464 for (int i = 0; i < pAppIdList_ForLaunchOnBoot->GetCount(); i++)
466 pPackageNameStr = dynamic_cast<String*>(pAppIdList_ForLaunchOnBoot->GetAt(i));
467 if (pPackageNameStr != null)
469 pPackageName = _StringConverter::CopyToCharArrayN(*pPackageNameStr);
471 SysLog(NID_APP, "'%ls'", pPackageNameStr->GetPointer()) ;
472 r = _AppControlManager::GetInstance()->LaunchPkg(pPackageName, null, null, null, null, null);
473 delete[] pPackageName;
477 SysLog(NID_APP, "'%ls'is launched", pPackageNameStr->GetPointer()) ;
481 SysLog(NID_APP, "%s", GetErrorMessage(r) );
486 pAppIdList_ForLaunchOnBoot->RemoveAll(true);
487 delete pAppIdList_ForLaunchOnBoot;
489 SysLog(NID_APP, "Exit.");
494 AppService::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
496 const String tmpPath = _HEARTBEAT_PATH;
497 File::Remove(tmpPath);
502 AppService::OnLowMemory(void)
508 AppService::OnBatteryLevelChanged(BatteryLevel batteryLevel)
514 AppService::OnUserEventReceivedN(RequestId requestId, IList *pArgs)
521 SysLog(NID_APP, "OnUserEventReceivedN() is called. RequestId = %d \n", requestId);
523 if (requestId == HANDLER_REQUEST_ALARMID)
526 for (int i = 0; (pArg = static_cast<String*>(pArgs->GetAt(i))) != null; i++)
529 Integer::Parse(*pArg, alarmId);
530 SysLog(NID_APP, "Alarm event is expired alarm Id is %d", alarmId);
531 if (__pAlarmService != NULL)
533 __pAlarmService->OnAlarmExpired(alarmId);
537 SysLog(NID_APP, "Alarm Service is not available. Alarm Event could not be announced.");
542 pArgs->RemoveAll(true);
546 AppService::GetPackageEventArgsN(const AppId& appId)
548 ArrayList* pArray = new (std::nothrow) ArrayList;
549 SysTryReturn(NID_APP, pArray != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Array allocation failure.");
554 String tmpExecName = Tizen::App::Package::_PackageManagerImpl::GetInstance()->GetDefaultAppExecutableName(appId);
555 String tmpPackageName = appId + "." + tmpExecName;
557 String* pPackageName;
561 pPackageName = new (std::nothrow) String(tmpPackageName);
562 SysTryCatch(NID_APP, pPackageName != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] packageName allocation failure.");
563 pArray->Add(*pPackageName);
565 pAppId = new (std::nothrow) String(appId);
566 SysTryCatch(NID_APP, pAppId != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] AppId %ls allocation failure.", appId.GetPointer());
567 pArray->Add(*pAppId);
569 // pExecName = new (std::nothrow) String(_ContextManager::_Util::GetExecNameFromPackageName(packageName));
570 pExecName = new (std::nothrow) String(tmpExecName);
571 SysTryCatch(NID_APP, pExecName != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
572 pArray->Add(*pExecName);
577 pArray->RemoveAll(true);
584 AppService::OnPackageInstallationCompleted(const PackageId& packageId, Tizen::App::Package::PackageInstallationResult installationResult)
586 SysLog(NID_APP, "Enter. packageId(%ls), installationResult(%d)", packageId.GetPointer(), installationResult);
588 if (installationResult == Tizen::App::Package::PACKAGE_INSTALLATION_RESULT_SUCCESS)
590 ArrayList* pArray = GetPackageEventArgsN(packageId);
591 SysTryReturnVoidResult(NID_APP, pArray != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] GetPackageEventArgsN failure.");
593 result r = __handlerThread.SendUserEvent(HANDLER_REQUEST_INSTALL_COMPLETE, pArray);
594 SysTryLog(NID_APP, !IsFailed(r), "[%s] Propagated.", GetErrorMessage(r));
597 SysLog(NID_APP, "Exit.");
601 AppService::OnPackageUninstallationCompleted(const PackageId& packageId, bool uninstallationResult)
603 SysLog(NID_APP, "Enter. packageId(%ls), uninstallationResult(%d)", packageId.GetPointer(), uninstallationResult);
605 if (uninstallationResult == true)
607 ArrayList* pArray = GetPackageEventArgsN(packageId);
608 SysTryReturnVoidResult(NID_APP, pArray != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] GetPackageEventArgsN failure.");
610 result r = __handlerThread.SendUserEvent(HANDLER_REQUEST_UNINSTALL_COMPLETE, pArray);
611 SysTryLog(NID_APP, !IsFailed(r), "[%s] Propagated.", GetErrorMessage(r));
614 SysLog(NID_APP, "Exit.");
618 AppService::OnPackageInstallationInProgress(const PackageId& packageId, int progress)
623 ConfirmCalendarService(void)
627 int ret = CALENDAR_ERROR_NONE;
632 int ret = calendar_connect();
633 if (ret == CALENDAR_ERROR_NONE)
635 calendar_disconnect();
636 SysLog(NID_APP, "Found calendar service on %dth trial.", count);
640 SysLog(NID_APP, "Waiting for calendar service %dth time(%d msec).", count, interval);
642 if (count >= WAIT_COUNT)
644 SysLog(NID_APP, "Count overflow.");
649 Thread::Sleep(interval);
650 interval += 150 * count;
657 AppService::OnApplicationLaunched(const AppId& appId, Tizen::App::_AppType type)
659 static bool channelServiceLaunched = false;
660 static bool securityServiceLaunched = false;
662 const String CHANNEL_SERVICE_APPID = L"cp7ipabg4k";
663 const String SECURITY_SERVICE_APPID = L"q7097a278m";
665 if (appId == CHANNEL_SERVICE_APPID)
667 channelServiceLaunched = true;
669 else if (appId == SECURITY_SERVICE_APPID)
671 securityServiceLaunched = true;
675 if (securityServiceLaunched && channelServiceLaunched)
677 _AppManagerImpl::GetInstance()->RemoveEventListener(*this);
678 LaunchSystemServices();
680 Tizen::App::Package::_PackageManagerImpl::GetInstance()->AddEventListener(this, 0);
682 ConfirmCalendarService();
683 vconf_set_int(VCONFKEY_APPSERVICE_STATUS, 2);
685 LaunchUserServices();
690 AppService::OnApplicationTerminated(const AppId& appId, Tizen::App::_AppType type)
692 SysLog(NID_APP, "Do nothing.");
697 * AppService::_TaskHandlerThread
700 AppService::_TaskHandlerThread::_TaskHandlerThread(AppService& mgr)
705 AppService::_TaskHandlerThread::~_TaskHandlerThread(void)
710 AppService::_TaskHandlerThread::OnStart(void)
716 AppService::_TaskHandlerThread::OnStop(void)
721 AppService::_TaskHandlerThread::OnUserEventReceivedN(RequestId reqId, IList* pArgs)
723 SysLog(NID_APP, "Enter.");
724 SysTryReturnVoidResult(NID_APP, pArgs != null && pArgs->GetCount() == 3, E_INVALID_STATE, "Wrong argument delivered for install complete event.");
726 String* pPackageName= dynamic_cast<String*>( pArgs->GetAt(0) );
727 SysTryReturnVoidResult(NID_APP, pPackageName != null, E_INVALID_STATE, "Invalid packageName for install complete event.");
729 String* pAppId = dynamic_cast<String*>( pArgs->GetAt(1) );
730 SysTryReturnVoidResult(NID_APP, pAppId != null, E_INVALID_STATE, "Invalid appId for install complete event.");
732 String* pExecName= dynamic_cast<String*>( pArgs->GetAt(2) );
733 SysTryReturnVoidResult(NID_APP, pExecName != null, E_INVALID_STATE, "Invalid execName for install complete event.");
737 case HANDLER_REQUEST_INSTALL_COMPLETE:
739 String isLaunchOnBoot = _ContextManager::_Util::QueryFeatureFromPackageManager(*pAppId, *pExecName, L"LaunchOnBoot" );
740 if ( isLaunchOnBoot == L"True")
742 String realId = *pAppId + '.' + *pExecName;
743 result r = _AppManagerImpl::GetInstance()->LaunchApplication(realId, null, AppManager::LAUNCH_OPTION_DEFAULT);
744 SysTryLog(NID_APP, !IsFailed(r), "%s", GetErrorMessage(r) );
745 SysLog(NID_APP, "'%ls'is launched", pExecName->GetPointer()) ;
748 SysTryReturnVoidResult(NID_APP, __mgr.__pConditionManagerStub != null, E_INVALID_STATE, "Invalid condition manager stub for install complete event.");
749 __mgr.__pConditionManagerStub->OnInstallComplete(*pAppId, *pExecName, *pPackageName);
753 case HANDLER_REQUEST_UNINSTALL_COMPLETE:
755 SysTryReturnVoidResult(NID_APP, __mgr.__pConditionManagerStub != null, E_INVALID_STATE, "Invalid condition manager stub for install complete event.");
756 __mgr.__pConditionManagerStub->OnUninstallComplete(*pAppId, *pExecName );
761 SysLog(NID_APP, "Wrong request Id for handler thread : 0x%x", reqId);
765 pArgs->RemoveAll(true);
768 SysLog(NID_APP, "Exit.");