summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-22 20:48:32 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:52:32 +0200
commitd6bcaa649127bc524087452c389f6dcee118cbfb (patch)
tree136cbd502c6fe24c31a94ef3beb7614080d00f98 /netwerk/protocol
parent92edec6f587ae6b86c9b27947113997972ce0c1a (diff)
downloadUXP-d6bcaa649127bc524087452c389f6dcee118cbfb.tar
UXP-d6bcaa649127bc524087452c389f6dcee118cbfb.tar.gz
UXP-d6bcaa649127bc524087452c389f6dcee118cbfb.tar.lz
UXP-d6bcaa649127bc524087452c389f6dcee118cbfb.tar.xz
UXP-d6bcaa649127bc524087452c389f6dcee118cbfb.zip
Issue #1053 - Remove android support from netwerk/protocol/http/nsHttpHandler.cpp
Diffstat (limited to 'netwerk/protocol')
-rw-r--r--netwerk/protocol/http/nsHttpHandler.cpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp
index e1b7c9bff..32e50712f 100644
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -783,49 +783,6 @@ nsHttpHandler::InitUserAgentComponents()
#endif
-#ifdef ANDROID
- nsCOMPtr<nsIPropertyBag2> infoService = do_GetService("@mozilla.org/system-info;1");
- MOZ_ASSERT(infoService, "Could not find a system info service");
- nsresult rv;
- // Add the Android version number to the Fennec platform identifier.
-#if defined MOZ_WIDGET_ANDROID
-#ifndef MOZ_UA_OS_AGNOSTIC // Don't add anything to mPlatform since it's empty.
- nsAutoString androidVersion;
- rv = infoService->GetPropertyAsAString(
- NS_LITERAL_STRING("release_version"), 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);
- }
- }
-#endif
-#endif
- // Add the `Mobile` or `Tablet` or `TV` token when running on device.
- bool isTablet;
- rv = infoService->GetPropertyAsBool(NS_LITERAL_STRING("tablet"), &isTablet);
- if (NS_SUCCEEDED(rv) && isTablet) {
- mCompatDevice.AssignLiteral("Tablet");
- } else {
- bool isTV;
- rv = infoService->GetPropertyAsBool(NS_LITERAL_STRING("tv"), &isTV);
- if (NS_SUCCEEDED(rv) && isTV) {
- mCompatDevice.AssignLiteral("TV");
- } else {
- mCompatDevice.AssignLiteral("Mobile");
- }
- }
-
- if (Preferences::GetBool(UA_PREF("use_device"), false)) {
- mDeviceModelId = mozilla::net::GetDeviceModelId();
- }
-#endif // ANDROID
-
#ifdef MOZ_MULET
{
// Add the `Mobile` or `Tablet` or `TV` token when running in the b2g
@@ -1005,18 +962,6 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
mUserAgentIsDirty = true;
}
-#ifdef ANDROID
- // general.useragent.use_device
- if (PREF_CHANGED(UA_PREF("use_device"))) {
- if (Preferences::GetBool(UA_PREF("use_device"), false)) {
- mDeviceModelId = mozilla::net::GetDeviceModelId();
- } else {
- mDeviceModelId = EmptyCString();
- }
- mUserAgentIsDirty = true;
- }
-#endif
-
//
// HTTP options
//