#include <pthread.h>
#include <FAppAppSetting.h>
#include <FBaseSysLog.h>
+#include <FSec_AccessController.h>
#include "FApp_AppSettingImpl.h"
using namespace Tizen::Base::Collection;
+using namespace Tizen::Security;
namespace Tizen { namespace App
{
AppSetting*
AppSetting::GetInstanceByAppId(const AppId& appId)
{
- //TODO: Add privilege checking code
+ result r = _AccessController::CheckUserPrivilege(_PRV_APPSETTING);
+ SysTryReturn(NID_APP, !IsFailed(r), null, E_PRIVILEGE_DENIED,
+ "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+
return _AppSettingImpl::GetInstanceByAppId(appId);
}
result
AppSetting::ReleaseInstanceByAppId(const AppId& appId)
{
+ result r = _AccessController::CheckUserPrivilege(_PRV_APPSETTING);
+ SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED,
+ "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+
return _AppSettingImpl::ReleaseInstanceByAppId(appId);
}
#include <FAppPkgPackageInfo.h>
#include <FAppPkgPackageManager.h>
#include <FAppIAppSettingEventListener.h>
-#include <FSec_AccessController.h>
#include "FApp_AppSettingImpl.h"
#include "FApp_AppInfo.h"
#include "FAppPkg_PackageManagerImpl.h"
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
using namespace Tizen::Io;
-using namespace Tizen::Security;
using namespace Tizen::App;
AppSetting* pAppSettingInstance = null;
String* pKeyStr = null;
- r = _AccessController::CheckUserPrivilege(_PRV_APPSETTING);
- SysTryReturn(NID_APP, !IsFailed(r), null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
-
// Convert AppId to package type id.
String packageId;
appId.SubString(0, APP_ID_LENTH, packageId);
result
_AppSettingImpl::_MutiInstanceManager::ReleaseInstanceByAppId(const AppId& appId)
{
- result r = _AccessController::CheckUserPrivilege(_PRV_APPSETTING);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED,
- "The application does not have the privilege to call this method.");
-
// Convert AppId to package type id.
String packageId;
appId.SubString(0, APP_ID_LENTH, packageId);