mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Issue #1053 - Remove android support from netwerk
This commit is contained in:
parent
659e10b6dd
commit
93a435ae22
31 changed files with 16 additions and 1404 deletions
|
|
@ -127,30 +127,6 @@ NewURI(const nsACString &aSpec,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
static nsCString
|
||||
GetDeviceModelId() {
|
||||
// Assumed to be running on the main thread
|
||||
// We need the device property in either case
|
||||
nsAutoCString deviceModelId;
|
||||
nsCOMPtr<nsIPropertyBag2> infoService = do_GetService("@mozilla.org/system-info;1");
|
||||
MOZ_ASSERT(infoService, "Could not find a system info service");
|
||||
nsAutoString androidDevice;
|
||||
nsresult rv = infoService->GetPropertyAsAString(NS_LITERAL_STRING("device"), androidDevice);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
deviceModelId = NS_LossyConvertUTF16toASCII(androidDevice);
|
||||
}
|
||||
nsAutoCString deviceString;
|
||||
rv = Preferences::GetCString(UA_PREF("device_string"), &deviceString);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
deviceString.Trim(" ", true, true);
|
||||
deviceString.ReplaceSubstring(NS_LITERAL_CSTRING("%DEVICEID%"), deviceModelId);
|
||||
return deviceString;
|
||||
}
|
||||
return deviceModelId;
|
||||
}
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// nsHttpHandler <public>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -792,9 +768,7 @@ nsHttpHandler::InitUserAgentComponents()
|
|||
#ifndef MOZ_UA_OS_AGNOSTIC
|
||||
// Gather platform.
|
||||
mPlatform.AssignLiteral(
|
||||
#if defined(ANDROID)
|
||||
"Android"
|
||||
#elif defined(XP_WIN)
|
||||
#if defined(XP_WIN)
|
||||
"Windows"
|
||||
#elif defined(XP_MACOSX)
|
||||
"Macintosh"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue