diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-22 20:48:32 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-02-22 20:48:32 -0500 |
commit | 13a8e788810c006e964cc3a87c0ddb9ca1eb9114 (patch) | |
tree | 7b01bd820a7a26e67fe3a73c24ed543f40a68d98 /netwerk/protocol | |
parent | bdad2357a1f0d2aca7f1106f3195d1fd929dc1d1 (diff) | |
download | uxp-13a8e788810c006e964cc3a87c0ddb9ca1eb9114.tar.gz |
Issue #1053 - Remove android support from netwerk/protocol/http/nsHttpHandler.cpp
Diffstat (limited to 'netwerk/protocol')
-rw-r--r-- | netwerk/protocol/http/nsHttpHandler.cpp | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index e1b7c9bff5..32e50712f6 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 // |