From 35c26c6c19e66fabcb230fb074e76e243df04d2b Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 25 Feb 2020 19:45:39 -0500 Subject: Issue #1053 - Remove android support from toolkit Note: Does not remove support completely from toolkit/mozapps/installer or from telemetry or AppConstants.jsm --- toolkit/content/aboutSupport.js | 10 ---------- toolkit/content/aboutSupport.xhtml | 5 ----- toolkit/content/aboutTelemetry.js | 8 -------- toolkit/content/buildconfig.html | 4 ---- toolkit/content/contentAreaUtils.js | 34 +--------------------------------- toolkit/content/jar.mn | 2 -- toolkit/content/moz.build | 3 --- 7 files changed, 1 insertion(+), 65 deletions(-) (limited to 'toolkit/content') diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js index f49172230..f9a0abcb0 100644 --- a/toolkit/content/aboutSupport.js +++ b/toolkit/content/aboutSupport.js @@ -599,16 +599,6 @@ function copyContentsToClipboard() { let clipboard = Cc["@mozilla.org/widget/clipboard;1"] .getService(Ci.nsIClipboard); clipboard.setData(transferable, null, clipboard.kGlobalClipboard); - -#ifdef MOZ_WIDGET_ANDROID - // Present a toast notification. - let message = { - type: "Toast:Show", - message: stringBundle().GetStringFromName("textCopied"), - duration: "short" - }; - Services.androidBridge.handleGeckoMessage(message); -#endif } // Return the plain text representation of an element. Do a little bit diff --git a/toolkit/content/aboutSupport.xhtml b/toolkit/content/aboutSupport.xhtml index 0b7b52164..8afee1867 100644 --- a/toolkit/content/aboutSupport.xhtml +++ b/toolkit/content/aboutSupport.xhtml @@ -101,7 +101,6 @@ -#ifndef ANDROID #ifdef MOZ_UPDATER @@ -115,7 +114,6 @@ #endif -#endif #ifdef MOZ_UPDATER @@ -240,7 +238,6 @@ -#ifndef ANDROID &aboutSupport.appBasicsProfiles; @@ -250,8 +247,6 @@ about:profiles -#endif - diff --git a/toolkit/content/aboutTelemetry.js b/toolkit/content/aboutTelemetry.js index 0829fe7e2..97dcba9e2 100644 --- a/toolkit/content/aboutTelemetry.js +++ b/toolkit/content/aboutTelemetry.js @@ -233,17 +233,9 @@ var Settings = { let elements = document.getElementsByClassName("change-data-choices-link"); for (let el of elements) { el.addEventListener("click", function() { -#ifdef MOZ_WIDGET_ANDROID - Cu.import("resource://gre/modules/Messaging.jsm"); - Messaging.sendRequest({ - type: "Settings:Show", - resource: "preferences_privacy", - }); -#else // Show the data choices preferences on desktop. let mainWindow = getMainWindowWithPreferencesPane(); mainWindow.openAdvancedPreferences("dataChoicesTab"); -#endif }, false); } }, diff --git a/toolkit/content/buildconfig.html b/toolkit/content/buildconfig.html index d3373f54c..322208189 100644 --- a/toolkit/content/buildconfig.html +++ b/toolkit/content/buildconfig.html @@ -58,9 +58,5 @@

Configure options

@MOZ_CONFIGURE_OPTIONS@

-#ifdef ANDROID -

Package name

-

@ANDROID_PACKAGE_NAME@

-#endif diff --git a/toolkit/content/contentAreaUtils.js b/toolkit/content/contentAreaUtils.js index 2512804fa..17e463325 100644 --- a/toolkit/content/contentAreaUtils.js +++ b/toolkit/content/contentAreaUtils.js @@ -1115,40 +1115,8 @@ function validateFileName(aFileName) aFileName = aFileName.replace(/[\<]+/g, "("); aFileName = aFileName.replace(/[\>]+/g, ")"); } - else if (navigator.appVersion.indexOf("Macintosh") != -1) + else if (navigator.appVersion.indexOf("Macintosh") != -1) { re = /[\:\/]+/g; - else if (navigator.appVersion.indexOf("Android") != -1) { - // On mobile devices, the filesystem may be very limited in what - // it considers valid characters. To avoid errors, we sanitize - // conservatively. - const dangerousChars = "*?<>|\":/\\[];,+="; - var processed = ""; - for (var i = 0; i < aFileName.length; i++) - processed += aFileName.charCodeAt(i) >= 32 && - !(dangerousChars.indexOf(aFileName[i]) >= 0) ? aFileName[i] - : "_"; - - // Last character should not be a space - processed = processed.trim(); - - // If a large part of the filename has been sanitized, then we - // will use a default filename instead - if (processed.replace(/_/g, "").length <= processed.length/2) { - // We purposefully do not use a localized default filename, - // which we could have done using - // ContentAreaUtils.stringBundle.GetStringFromName("DefaultSaveFileName") - // since it may contain invalid characters. - var original = processed; - processed = "download"; - - // Preserve a suffix, if there is one - if (original.indexOf(".") >= 0) { - var suffix = original.split(".").slice(-1)[0]; - if (suffix && suffix.indexOf("_") < 0) - processed += "." + suffix; - } - } - return processed; } return aFileName.replace(re, "_"); diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn index 96c559bb2..c73427a31 100644 --- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn @@ -19,10 +19,8 @@ toolkit.jar: #endif content/global/aboutNetworking.js content/global/aboutNetworking.xhtml -#ifndef ANDROID * content/global/aboutProfiles.js content/global/aboutProfiles.xhtml -#endif content/global/aboutServiceWorkers.js content/global/aboutServiceWorkers.xhtml #ifdef MOZ_WEBRTC diff --git a/toolkit/content/moz.build b/toolkit/content/moz.build index b1f6b6419..0a08483b4 100644 --- a/toolkit/content/moz.build +++ b/toolkit/content/moz.build @@ -14,9 +14,6 @@ for var in ('target', DEFINES['CFLAGS'] = CONFIG['OS_CFLAGS'] DEFINES['TOPOBJDIR'] = TOPOBJDIR -if CONFIG['OS_TARGET'] == 'Android': - DEFINES['ANDROID_PACKAGE_NAME'] = CONFIG['ANDROID_PACKAGE_NAME'] - if CONFIG['MOZ_ANDROID_CXX_STL'] == 'libc++': DEFINES['MOZ_USE_LIBCXX'] = True -- cgit v1.2.3