Issue #1053 - Remove android support from toolkit

Note: Does not remove support completely from toolkit/mozapps/installer or from telemetry or AppConstants.jsm
This commit is contained in:
Matt A. Tobin 2020-02-25 19:45:39 -05:00 • committed by Roy Tam
commit 678b1ea2ec
73 changed files with 105 additions and 2315 deletions

View file

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

View file

@ -101,7 +101,6 @@
<td id="buildid-box"></td>
</tr>
#ifndef ANDROID
#ifdef MOZ_UPDATER
<tr class="no-copy">
<th class="column">
@ -115,7 +114,6 @@
</td>
</tr>
#endif
#endif
#ifdef MOZ_UPDATER
<tr>
@ -240,7 +238,6 @@
</td>
</tr>
#ifndef ANDROID
<tr class="no-copy">
<th class="column">
&aboutSupport.appBasicsProfiles;
@ -250,8 +247,6 @@
<a href="about:profiles">about:profiles</a>
</td>
</tr>
#endif
</tbody>
</table>

View file

@ -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);
}
},

View file

@ -58,9 +58,5 @@
</table>
<h2>Configure options</h2>
<p>@MOZ_CONFIGURE_OPTIONS@</p>
#ifdef ANDROID
<h2>Package name</h2>
<p>@ANDROID_PACKAGE_NAME@</p>
#endif
</body>
</html>

View file

@ -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, "_");

View file

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

View file

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