summaryrefslogtreecommitdiffstats
path: root/toolkit/xre
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-25 19:45:39 -0500
committerMatt A. Tobin <email@mattatobin.com>2020-02-25 19:45:39 -0500
commit35c26c6c19e66fabcb230fb074e76e243df04d2b (patch)
tree9cbdb0397c76a7477cd60c53347ab33d426f2019 /toolkit/xre
parent8f35c37a9e82ea3e99780c1a001641227a00b6a9 (diff)
downloadUXP-35c26c6c19e66fabcb230fb074e76e243df04d2b.tar
UXP-35c26c6c19e66fabcb230fb074e76e243df04d2b.tar.gz
UXP-35c26c6c19e66fabcb230fb074e76e243df04d2b.tar.lz
UXP-35c26c6c19e66fabcb230fb074e76e243df04d2b.tar.xz
UXP-35c26c6c19e66fabcb230fb074e76e243df04d2b.zip
Issue #1053 - Remove android support from toolkit
Note: Does not remove support completely from toolkit/mozapps/installer or from telemetry or AppConstants.jsm
Diffstat (limited to 'toolkit/xre')
-rw-r--r--toolkit/xre/moz.build19
-rw-r--r--toolkit/xre/nsAndroidStartup.cpp45
-rw-r--r--toolkit/xre/nsAppRunner.cpp25
-rw-r--r--toolkit/xre/nsEmbedFunctions.cpp8
-rw-r--r--toolkit/xre/nsSigHandlers.cpp6
-rw-r--r--toolkit/xre/nsUpdateDriver.cpp2
-rw-r--r--toolkit/xre/nsXREDirProvider.cpp13
7 files changed, 10 insertions, 108 deletions
diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
index b00b419c8..4ad9926a8 100644
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
@@ -46,11 +46,6 @@ if CONFIG['MOZ_X11']:
EXPORTS += ['nsX11ErrorHandler.h']
UNIFIED_SOURCES += ['nsX11ErrorHandler.cpp']
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
- UNIFIED_SOURCES += [
- 'nsAndroidStartup.cpp',
- ]
-
UNIFIED_SOURCES += [
'CreateAppData.cpp',
'nsConsoleWriter.cpp',
@@ -79,10 +74,10 @@ if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
]
if CONFIG['MOZ_UPDATER']:
- if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
- UNIFIED_SOURCES += [
- 'nsUpdateDriver.cpp',
- ]
+ DEFINES['MOZ_UPDATER'] = True
+ UNIFIED_SOURCES += [
+ 'nsUpdateDriver.cpp',
+ ]
include('/ipc/chromium/chromium-config.mozbuild')
@@ -98,17 +93,11 @@ for var in ('MOZ_APP_NAME',
'MOZ_WIDGET_TOOLKIT'):
DEFINES[var] = '"%s"' % CONFIG[var]
-if CONFIG['MOZ_UPDATER'] and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
- DEFINES['MOZ_UPDATER'] = True
-
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
DEFINES['WIN32_LEAN_AND_MEAN'] = True
DEFINES['UNICODE'] = True
DEFINES['_UNICODE'] = True
-if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
- DEFINES['ANDROID_PACKAGE_NAME'] = '"%s"' % CONFIG['ANDROID_PACKAGE_NAME']
-
if CONFIG['TARGET_XPCOM_ABI']:
DEFINES['TARGET_OS_ABI'] = '"%s_%s"' % (CONFIG['OS_TARGET'],
CONFIG['TARGET_XPCOM_ABI'])
diff --git a/toolkit/xre/nsAndroidStartup.cpp b/toolkit/xre/nsAndroidStartup.cpp
deleted file mode 100644
index 68ad75c01..000000000
--- a/toolkit/xre/nsAndroidStartup.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include <android/log.h>
-
-#include <jni.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <pthread.h>
-
-#include "mozilla/jni/Utils.h"
-#include "nsTArray.h"
-#include "nsString.h"
-#include "nsIFile.h"
-#include "nsAppRunner.h"
-#include "APKOpen.h"
-
-#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, MOZ_APP_NAME, args)
-
-extern "C" NS_EXPORT void
-GeckoStart(JNIEnv* env, char* data, const nsXREAppData* appData)
-{
- mozilla::jni::SetGeckoThreadEnv(env);
-
- if (!data) {
- LOG("Failed to get arguments for GeckoStart\n");
- return;
- }
-
- nsTArray<char *> targs;
- char *arg = strtok(data, " ");
- while (arg) {
- targs.AppendElement(arg);
- arg = strtok(nullptr, " ");
- }
- targs.AppendElement(static_cast<char *>(nullptr));
-
- int result = XRE_main(targs.Length() - 1, targs.Elements(), appData, 0);
-
- if (result)
- LOG("XRE_main returned %d", result);
-}
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index d8f95c2a8..e3705a5c2 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -23,7 +23,7 @@
#include "nsAppRunner.h"
#include "mozilla/AppData.h"
-#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
+#ifdef MOZ_UPDATER
#include "nsUpdateDriver.h"
#endif
#include "ProfileReset.h"
@@ -186,10 +186,6 @@
#include "base/command_line.h"
#include "GTestRunner.h"
-#ifdef MOZ_WIDGET_ANDROID
-#include "GeneratedJNIWrappers.h"
-#endif
-
extern uint32_t gRestartMode;
extern void InstallSignalHandlers(const char *ProgramName);
@@ -1517,9 +1513,6 @@ static nsresult LaunchChild(nsINativeAppSupport* aNative,
SaveToEnv("MOZ_LAUNCHED_CHILD=1");
-#if defined(MOZ_WIDGET_ANDROID)
- java::GeckoAppShell::ScheduleRestart();
-#else
#if defined(XP_MACOSX)
CommandLineServiceMac::SetupMacCommandLine(gRestartArgc, gRestartArgv, true);
LaunchChildMac(gRestartArgc, gRestartArgv);
@@ -1559,7 +1552,6 @@ static nsresult LaunchChild(nsINativeAppSupport* aNative,
#endif // XP_UNIX
#endif // WP_WIN
#endif // WP_MACOSX
-#endif // MOZ_WIDGET_ANDROID
return NS_ERROR_LAUNCHED_CHILD_PROCESS;
}
@@ -1653,10 +1645,7 @@ ProfileLockedDialog(nsIFile* aProfileDir, nsIFile* aProfileLocalDir,
if (aUnlocker) {
int32_t button;
-#ifdef MOZ_WIDGET_ANDROID
- java::GeckoAppShell::KillAnyZombies();
- button = 0;
-#else
+
const uint32_t flags =
(nsIPromptService::BUTTON_TITLE_IS_STRING *
nsIPromptService::BUTTON_POS_0) +
@@ -1668,7 +1657,6 @@ ProfileLockedDialog(nsIFile* aProfileDir, nsIFile* aProfileLocalDir,
killTitle, nullptr, nullptr, nullptr,
&checkState, &button);
NS_ENSURE_SUCCESS_LOG(rv, rv);
-#endif
if (button == 0) {
rv = aUnlocker->Unlock(nsIProfileUnlocker::FORCE_QUIT);
@@ -1682,15 +1670,8 @@ ProfileLockedDialog(nsIFile* aProfileDir, nsIFile* aProfileLocalDir,
return LaunchChild(aNative);
}
} else {
-#ifdef MOZ_WIDGET_ANDROID
- if (java::GeckoAppShell::UnlockProfile()) {
- return NS_LockProfilePath(aProfileDir, aProfileLocalDir,
- nullptr, aResult);
- }
-#else
rv = ps->Alert(nullptr, killTitle, killMessage);
NS_ENSURE_SUCCESS_LOG(rv, rv);
-#endif
}
return NS_ERROR_ABORT;
@@ -3409,7 +3390,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag)
}
#endif
-#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
+#ifdef MOZ_UPDATER
// Check for and process any available updates
nsCOMPtr<nsIFile> updRoot;
bool persistent;
diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp
index 52b443770..f0a8d9cab 100644
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -246,17 +246,9 @@ XRE_InitChildProcess(int aArgc,
NS_ENSURE_ARG_POINTER(aArgv[0]);
MOZ_ASSERT(aChildData);
-#if !defined(MOZ_WIDGET_ANDROID)
// On non-Fennec Gecko, the GMPLoader code resides in plugin-container,
// and we must forward it through to the GMP code here.
GMPProcessChild::SetGMPLoader(aChildData->gmpLoader.get());
-#else
- // On Fennec, the GMPLoader's code resides inside XUL (because for the time
- // being GMPLoader relies upon NSPR, which we can't use in plugin-container
- // on Android), so we create it here inside XUL and pass it to the GMP code.
- UniquePtr<GMPLoader> loader = CreateGMPLoader(nullptr);
- GMPProcessChild::SetGMPLoader(loader.get());
-#endif
#if defined(XP_WIN)
// From the --attach-console support in nsNativeAppSupportWin.cpp, but
diff --git a/toolkit/xre/nsSigHandlers.cpp b/toolkit/xre/nsSigHandlers.cpp
index 660af4522..11648e45a 100644
--- a/toolkit/xre/nsSigHandlers.cpp
+++ b/toolkit/xre/nsSigHandlers.cpp
@@ -27,9 +27,7 @@
#include <unistd.h>
#include <stdlib.h> // atoi
#include <sys/prctl.h>
-#ifndef ANDROID // no Android impl
-# include <ucontext.h>
-#endif
+#include <ucontext.h>
#endif
#ifdef XP_SOLARIS
@@ -172,7 +170,7 @@ static void fpehandler(int signum, siginfo_t *si, void *context)
*mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */
#endif
#endif
-#if defined(LINUX) && !defined(ANDROID)
+#if defined(LINUX)
ucontext_t *uc = (ucontext_t *)context;
#if defined(__i386__)
diff --git a/toolkit/xre/nsUpdateDriver.cpp b/toolkit/xre/nsUpdateDriver.cpp
index be11fb158..499445885 100644
--- a/toolkit/xre/nsUpdateDriver.cpp
+++ b/toolkit/xre/nsUpdateDriver.cpp
@@ -333,7 +333,7 @@ CopyUpdaterIntoUpdateDir(nsIFile *greDir, nsIFile *appDir, nsIFile *updateDir,
return false;
CopyFileIntoUpdateDir(appDir, NS_LITERAL_CSTRING(UPDATER_INI), updateDir);
#endif
-#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(ANDROID)
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
nsCOMPtr<nsIFile> iconDir;
appDir->Clone(getter_AddRefs(iconDir));
iconDir->AppendNative(NS_LITERAL_CSTRING("icons"));
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
index 265652477..151eb34e5 100644
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -1340,10 +1340,6 @@ nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile, bool aLocal)
if (!homeDir || !*homeDir)
return NS_ERROR_FAILURE;
-#ifdef ANDROID /* We want (ProfD == ProfLD) on Android. */
- aLocal = false;
-#endif
-
if (aLocal) {
// If $XDG_CACHE_HOME is defined use it, otherwise use $HOME/.cache.
const char* cacheHome = getenv("XDG_CACHE_HOME");
@@ -1550,15 +1546,6 @@ nsXREDirProvider::AppendProfilePath(nsIFile* aFile,
}
NS_ENSURE_SUCCESS(rv, rv);
-#elif defined(ANDROID)
- // The directory used for storing profiles
- // The parent of this directory is set in GetUserDataDirectoryHome
- // XXX: handle gAppData->profile properly
- // XXXsmaug ...and the rest of the profile creation!
- MOZ_ASSERT(!aAppName,
- "Profile creation for external applications is not implemented!");
- rv = aFile->AppendNative(nsDependentCString("mozilla"));
- NS_ENSURE_SUCCESS(rv, rv);
#elif defined(XP_UNIX)
nsAutoCString folder;
// Make it hidden (by starting with "."), except when local (the