Bug 823253 - Part 1 - Whitelist HTC Gingerbread devices for stagefright decoding - r=bjacob

--HG--
extra : rebase_source : c602f4691a69a15bca97364f4104caf6420d9a71
This commit is contained in:
Chris Double 2013-02-18 13:36:01 +13:00
parent af06207909
commit ed7d2e5587

View File

@ -355,7 +355,20 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
if (aFeature == FEATURE_STAGEFRIGHT) {
NS_LossyConvertUTF16toASCII cManufacturer(mManufacturer);
NS_LossyConvertUTF16toASCII cModel(mModel);
if (CompareVersions(mOSVersion.get(), "4.0.0") < 0)
if (CompareVersions(mOSVersion.get(), "2.3.0") >= 0 &&
CompareVersions(mOSVersion.get(), "2.4.0") < 0)
{
// Gingerbread HTC devices are whitelisted.
// All other Gingerbread devices are blacklisted.
bool isWhitelisted =
cManufacturer.Equals("htc", nsCaseInsensitiveCStringComparator());
if (!isWhitelisted) {
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
return NS_OK;
}
}
else if (CompareVersions(mOSVersion.get(), "4.0.0") < 0)
{
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION;
return NS_OK;