Bug 1299054 - Remove old Android support (API level < 15) from Gecko. r=snorp

MozReview-Commit-ID: K32YSqGsLf9

--HG--
extra : rebase_source : be0d3b3fc1146234efc75229171ea61258c46492
This commit is contained in:
Makoto Kato 2016-08-30 14:11:55 +09:00
parent b7c99cc4bf
commit ec124dbfbd
6 changed files with 4 additions and 122 deletions

View File

@ -176,10 +176,6 @@ static const char* GetOmxLibraryName()
if (version >= 17) {
return "libomxpluginkk.so";
}
else if (version < 14) {
// Below Honeycomb not supported
return nullptr;
}
// Ice Cream Sandwich and Jellybean
return "libomxplugin.so";

View File

@ -212,11 +212,6 @@ nsPluginInstanceOwner::GetImageContainer()
RefPtr<ImageContainer> container;
#if MOZ_WIDGET_ANDROID
// Right now we only draw with Gecko layers on Honeycomb and higher. See Paint()
// for what we do on other versions.
if (AndroidBridge::Bridge()->GetAPIVersion() < 11)
return nullptr;
LayoutDeviceRect r = GetPluginRect();
// NotifySize() causes Flash to do a bunch of stuff like ask for surfaces to render

View File

@ -46,12 +46,6 @@ public:
}
};
static bool
IsSTSupported()
{
return AndroidBridge::Bridge()->GetAPIVersion() >= 14; /* ICS */
}
already_AddRefed<AndroidSurfaceTexture>
AndroidSurfaceTexture::Create()
{
@ -61,10 +55,6 @@ AndroidSurfaceTexture::Create()
already_AddRefed<AndroidSurfaceTexture>
AndroidSurfaceTexture::Create(GLContext* aContext, GLuint aTexture)
{
if (!IsSTSupported()) {
return nullptr;
}
RefPtr<AndroidSurfaceTexture> st = new AndroidSurfaceTexture();
if (!st->Init(aContext, aTexture)) {
printf_stderr("Failed to initialize AndroidSurfaceTexture");

View File

@ -1388,10 +1388,8 @@ nsPluginFrame::GetLayerState(nsDisplayListBuilder* aBuilder,
#ifdef MOZ_WIDGET_ANDROID
// We always want a layer on Honeycomb and later
if (AndroidBridge::Bridge()->GetAPIVersion() >= 11)
return LAYER_ACTIVE;
#endif
return LAYER_ACTIVE;
#else
if (mInstanceOwner->NeedsScrollImageLayer()) {
return LAYER_ACTIVE;
}
@ -1401,6 +1399,7 @@ nsPluginFrame::GetLayerState(nsDisplayListBuilder* aBuilder,
}
return LAYER_ACTIVE_FORCE;
#endif
}
class PluginFrameDidCompositeObserver final : public ClientLayerManager::

View File

@ -48,11 +48,6 @@
#include "SerializedLoadContext.h"
#include "mozilla/net/NeckoChild.h"
#if defined(ANDROID) && !defined(MOZ_WIDGET_GONK)
#include "nsIPropertyBag2.h"
static const int32_t ANDROID_23_VERSION = 10;
#endif
using namespace mozilla;
namespace mozilla {
@ -590,22 +585,6 @@ Predictor::Init()
nsresult rv = NS_OK;
#if defined(ANDROID) && !defined(MOZ_WIDGET_GONK)
// This is an ugly hack to disable the predictor on android < 2.3, as it
// doesn't play nicely with those android versions, at least on our infra.
// Causes timeouts in reftests. See bug 881804 comment 86.
nsCOMPtr<nsIPropertyBag2> infoService =
do_GetService("@mozilla.org/system-info;1");
if (infoService) {
int32_t androidVersion = -1;
rv = infoService->GetPropertyAsInt32(NS_LITERAL_STRING("version"),
&androidVersion);
if (NS_SUCCEEDED(rv) && (androidVersion < ANDROID_23_VERSION)) {
return NS_ERROR_NOT_AVAILABLE;
}
}
#endif
rv = InstallObserver();
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -462,84 +462,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
return NS_OK;
}
if (CompareVersions(mOSVersion.get(), "2.2.0") >= 0 &&
CompareVersions(mOSVersion.get(), "2.3.0") < 0)
{
// Froyo LG devices are whitelisted.
// All other Froyo
bool isWhitelisted =
cManufacturer.Equals("lge", nsCaseInsensitiveCStringComparator());
if (!isWhitelisted) {
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
aFailureId = "FEATURE_FAILURE_OLD_ANDROID";
return NS_OK;
}
}
else if (CompareVersions(mOSVersion.get(), "2.3.0") >= 0 &&
CompareVersions(mOSVersion.get(), "2.4.0") < 0)
{
// Gingerbread HTC devices are whitelisted.
// Gingerbread Samsung devices are whitelisted except for:
// Samsung devices identified in Bug 847837
// Gingerbread Sony devices are whitelisted.
// All other Gingerbread devices are blacklisted.
bool isWhitelisted =
cManufacturer.Equals("htc", nsCaseInsensitiveCStringComparator()) ||
(cManufacturer.Find("sony", true) != -1) ||
cManufacturer.Equals("samsung", nsCaseInsensitiveCStringComparator());
if (cModel.Equals("GT-I8160", nsCaseInsensitiveCStringComparator()) ||
cModel.Equals("GT-I8160L", nsCaseInsensitiveCStringComparator()) ||
cModel.Equals("GT-I8530", nsCaseInsensitiveCStringComparator()) ||
cModel.Equals("GT-I9070", nsCaseInsensitiveCStringComparator()) ||
cModel.Equals("GT-I9070P", nsCaseInsensitiveCStringComparator()) ||
cModel.Equals("GT-I8160P", nsCaseInsensitiveCStringComparator()) ||
cModel.Equals("GT-S7500", nsCaseInsensitiveCStringComparator()) ||
cModel.Equals("GT-S7500T", nsCaseInsensitiveCStringComparator()) ||
cModel.Equals("GT-S7500L", nsCaseInsensitiveCStringComparator()) ||
cModel.Equals("GT-S6500T", nsCaseInsensitiveCStringComparator()) ||
cHardware.Equals("smdkc110", nsCaseInsensitiveCStringComparator()) ||
cHardware.Equals("smdkc210", nsCaseInsensitiveCStringComparator()) ||
cHardware.Equals("herring", nsCaseInsensitiveCStringComparator()) ||
cHardware.Equals("shw-m110s", nsCaseInsensitiveCStringComparator()) ||
cHardware.Equals("shw-m180s", nsCaseInsensitiveCStringComparator()) ||
cHardware.Equals("n1", nsCaseInsensitiveCStringComparator()) ||
cHardware.Equals("latona", nsCaseInsensitiveCStringComparator()) ||
cHardware.Equals("aalto", nsCaseInsensitiveCStringComparator()) ||
cHardware.Equals("atlas", nsCaseInsensitiveCStringComparator()) ||
cHardware.Equals("qcom", nsCaseInsensitiveCStringComparator()))
{
isWhitelisted = false;
}
if (!isWhitelisted) {
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
aFailureId = "FEATURE_FAILURE_OLD_ANDROID_2";
return NS_OK;
}
}
else if (CompareVersions(mOSVersion.get(), "3.0.0") >= 0 &&
CompareVersions(mOSVersion.get(), "4.0.0") < 0)
{
// Honeycomb Samsung devices are whitelisted.
// All other Honeycomb devices are blacklisted.
bool isWhitelisted =
cManufacturer.Equals("samsung", nsCaseInsensitiveCStringComparator());
if (!isWhitelisted) {
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
aFailureId = "FEATURE_FAILURE_SAMSUNG";
return NS_OK;
}
}
else if (CompareVersions(mOSVersion.get(), "4.0.0") < 0)
{
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION;
aFailureId = "FEATURE_FAILURE_OLD_ANDROID_4";
return NS_OK;
}
else if (CompareVersions(mOSVersion.get(), "4.1.0") < 0)
if (CompareVersions(mOSVersion.get(), "4.1.0") < 0)
{
// Whitelist:
// All Samsung ICS devices, except for: