#include <FTelNetworkInfo.h>
#include <FBaseSysLog.h>
#include <FSec_AccessController.h>
+#include <FSys_SystemInfoImpl.h>
#include "FTel_NetworkInfoImpl.h"
using namespace Tizen::Base;
using namespace Tizen::Security;
+using namespace Tizen::System;
namespace Tizen { namespace Telephony
int
NetworkInfo::GetRssi(void)
{
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
ClearLastResult();
int rssi = -1;
result r = _AccessController::CheckUserPrivilege(_PRV_SYSTEMINFO, _PRV_TELEPHONY);
-
SysTryReturn(NID_TEL, r == E_SUCCESS, rssi, E_PRIVILEGE_DENIED,
"[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ bool isTelephonySupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported);
+ SysTryReturn(NID_TEL, r == E_SUCCESS && isTelephonySupported, rssi, E_UNSUPPORTED_OPERATION,
+ "[%s] Telephony is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
+
rssi = _NetworkInfoImpl::GetRssi();
r = GetLastResult();