Bug 874791 - Add permission check for call barring API. r=hsinyi

This commit is contained in:
Szu-Yu Chen [:aknow] 2013-05-22 17:05:08 +08:00
parent 64e19c2659
commit ca114f9f34

View File

@ -397,6 +397,10 @@ MobileConnection::GetCallBarringOption(const JS::Value& aOption,
{
*aRequest = nullptr;
if (!CheckPermission("mobileconnection")) {
return NS_OK;
}
if (!mProvider) {
return NS_ERROR_FAILURE;
}
@ -410,6 +414,10 @@ MobileConnection::SetCallBarringOption(const JS::Value& aOption,
{
*aRequest = nullptr;
if (!CheckPermission("mobileconnection")) {
return NS_OK;
}
if (!mProvider) {
return NS_ERROR_FAILURE;
}