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:
Chris Peterson 2023-11-06 22:02:25 +00:00
Родитель a4dae64f34
Коммит f5581089fd
1 изменённых файлов: 1 добавлений и 8 удалений

Просмотреть файл

@ -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.