Bug 794188: Check the fmradio permission at process boundaries. r=jlebar

This commit is contained in:
Chris Jones 2012-09-29 15:09:19 -07:00
parent 2b02131b60
commit fcbd8b701e

View File

@ -736,6 +736,9 @@ public:
virtual bool
RecvEnableFMRadio(const hal::FMRadioSettings& aSettings)
{
if (!AssertAppProcessPermission(this, "fmradio")) {
return false;
}
hal::EnableFMRadio(aSettings);
return true;
}
@ -743,6 +746,9 @@ public:
virtual bool
RecvDisableFMRadio()
{
if (!AssertAppProcessPermission(this, "fmradio")) {
return false;
}
hal::DisableFMRadio();
return true;
}
@ -750,6 +756,9 @@ public:
virtual bool
RecvFMRadioSeek(const hal::FMRadioSeekDirection& aDirection)
{
if (!AssertAppProcessPermission(this, "fmradio")) {
return false;
}
hal::FMRadioSeek(aDirection);
return true;
}
@ -757,6 +766,9 @@ public:
virtual bool
RecvGetFMRadioSettings(hal::FMRadioSettings* aSettings)
{
if (!AssertAppProcessPermission(this, "fmradio")) {
return false;
}
hal::GetFMRadioSettings(aSettings);
return true;
}
@ -764,6 +776,9 @@ public:
virtual bool
RecvSetFMRadioFrequency(const uint32_t& aFrequency)
{
if (!AssertAppProcessPermission(this, "fmradio")) {
return false;
}
hal::SetFMRadioFrequency(aFrequency);
return true;
}
@ -771,6 +786,9 @@ public:
virtual bool
RecvGetFMRadioFrequency(uint32_t* aFrequency)
{
if (!AssertAppProcessPermission(this, "fmradio")) {
return false;
}
*aFrequency = hal::GetFMRadioFrequency();
return true;
}
@ -783,6 +801,9 @@ public:
virtual bool
RecvIsFMRadioOn(bool* radioOn)
{
if (!AssertAppProcessPermission(this, "fmradio")) {
return false;
}
*radioOn = hal::IsFMRadioOn();
return true;
}
@ -790,6 +811,9 @@ public:
virtual bool
RecvGetFMRadioSignalStrength(uint32_t* strength)
{
if (!AssertAppProcessPermission(this, "fmradio")) {
return false;
}
*strength = hal::GetFMRadioSignalStrength();
return true;
}
@ -797,6 +821,9 @@ public:
virtual bool
RecvCancelFMRadioSeek()
{
if (!AssertAppProcessPermission(this, "fmradio")) {
return false;
}
hal::CancelFMRadioSeek();
return true;
}