virtual result OnServiceEventReceived(int clientId, const _AppManagerEventArg& arg);
virtual result OnTerminateApplicationRequested(int clientId);
+ bool OnIsUserPreferredAppForAppControlResolution(const AppId& appId, bool *pRes, result *pResException);
+ bool OnClearUserPreferenceForAppControlResolution(const AppId& appId, result *pRes);
+
private:
result StartIpcServer(void);
_AppManagerStub(const _AppManagerStub& value);
#include "FAppPkg_PackageManagerImpl.h"
#include "FApp_ContextManager.h"
#include "FApp_AppManagerService.h"
+#include "FApp_AulServer.h"
using namespace Tizen::Base;
__pContextMgr->Dump();
}
+bool
+_AppManagerService::IsUserPreferredAppForAppControlResolution(const AppId& appId)
+{
+ return _AulServer::IsUserPreferredAppForAppControlResolution(appId);
+}
+
+result
+_AppManagerService::ClearUserPreferenceForAppControlResolution(const AppId& appId)
+{
+ return _AulServer::ClearUserPreferenceForAppControlResolution(appId);
+}
}}//namespace Tizen { namespace App {
IPC_MESSAGE_HANDLER_EX(AppManager_UnregisterApplication, &server, OnUnregisterApplication)
IPC_MESSAGE_HANDLER_EX(AppManager_AddEventListener, &server, OnAddEventListener)
IPC_MESSAGE_HANDLER_EX(AppManager_RemoveEventListener, &server, OnRemoveEventListener)
+ IPC_MESSAGE_HANDLER_EX(AppManager_IsUserPreferredAppForAppControlResolution, &server, OnIsUserPreferredAppForAppControlResolution)
+ IPC_MESSAGE_HANDLER_EX(AppManager_ClearUserPreferenceForAppControlResolution, &server, OnClearUserPreferenceForAppControlResolution)
IPC_END_MESSAGE_MAP()
}
// SysLog(NID_APP, "(pkgId:%ls, clientId:%d)\n", server.GetClientPackageId().GetPointer(), clientId);
}
+bool
+_AppManagerStub::OnIsUserPreferredAppForAppControlResolution(const AppId& appId, bool *pRes, result *pResException)
+{
+ SysTryCatch(NID_APP, __pAppManagerService != null, *pResException = E_SYSTEM, E_SYSTEM, "__pAppManagerService is null!");
+ SysLog(NID_APP, "app(%ls)", appId.GetPointer());
+
+/*
+ *pResException = _AccessController::CheckSystemPrivilege(__pIpcServer->GetClientPackageId(), _PRV_APPMANAGER_SETTING);
+
+ if (IsFailed(*pResException))
+ {
+ SysLog(NID_APP, "[E_PRIVILEGE_DENIED]The application(%ls) does not have the privilege to call this method.", appId.GetPointer());
+ *pResException = E_PRIVILEGE_DENIED;
+ return true;
+ }
+*/
+ *pRes = __pAppManagerService->IsUserPreferredAppForAppControlResolution(appId);
+
+CATCH:
+ return true;
+
+}
+
+bool
+_AppManagerStub::OnClearUserPreferenceForAppControlResolution(const AppId& appId, result *pRes)
+{
+ SysTryCatch(NID_APP, __pAppManagerService != null, *pRes = E_SYSTEM, E_SYSTEM, "__pAppManagerService is null!");
+ SysLog(NID_APP, "app(%ls)", appId.GetPointer());
+/*
+ *pRes = _AccessController::CheckSystemPrivilege(__pIpcServer->GetClientPackageId(), _PRV_APPMANAGER_SETTING);
+
+ if (IsFailed(*pRes))
+ {
+ SysLog(NID_APP, "[E_PRIVILEGE_DENIED]The application(%ls) does not have the privilege to call this method.", appId.GetPointer());
+ *pRes = E_PRIVILEGE_DENIED;
+ return true;
+ }
+*/
+ *pRes = __pAppManagerService->ClearUserPreferenceForAppControlResolution(appId);
+
+CATCH:
+ return true;
+
+}
}}//namespace Tizen { namespace App {