зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1863111 - Remove UA string workaround for Android versions < 4.4. r=necko-reviewers,valentin
GeckoView's minimum Android version was raised from 4.4 to 5.0 in bug 1820295. Differential Revision: https://phabricator.services.mozilla.com/D192768
This commit is contained in:
Родитель
a4dae64f34
Коммит
f5581089fd
|
@ -854,14 +854,7 @@ void nsHttpHandler::InitUserAgentComponents() {
|
|||
rv = infoService->GetPropertyAsAString(u"release_version"_ns, androidVersion);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mPlatform += " ";
|
||||
// If the 2nd character is a ".", we know the major version is a single
|
||||
// digit. If we're running on a version below 4 we pretend to be on
|
||||
// Android KitKat (4.4) to work around scripts sniffing for low versions.
|
||||
if (androidVersion[1] == 46 && androidVersion[0] < 52) {
|
||||
mPlatform += "4.4";
|
||||
} else {
|
||||
mPlatform += NS_LossyConvertUTF16toASCII(androidVersion);
|
||||
}
|
||||
mPlatform += NS_LossyConvertUTF16toASCII(androidVersion);
|
||||
}
|
||||
|
||||
// Add the `Mobile` or `TV` token when running on device.
|
||||
|
|
Загрузка…
Ссылка в новой задаче