diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-22 19:22:01 -0500 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:51:52 +0200 |
commit | 54cb1b965e5a6d6bd2475c909486468f5e6dd982 (patch) | |
tree | 7e52ded29a0ae19f6f6aab79c33cb572e9e89a43 /uriloader/exthandler/nsExternalHelperAppService.cpp | |
parent | a6d1dd183d3ffa01e8d9f51c6a08bf295e0427f2 (diff) | |
download | UXP-54cb1b965e5a6d6bd2475c909486468f5e6dd982.tar UXP-54cb1b965e5a6d6bd2475c909486468f5e6dd982.tar.gz UXP-54cb1b965e5a6d6bd2475c909486468f5e6dd982.tar.lz UXP-54cb1b965e5a6d6bd2475c909486468f5e6dd982.tar.xz UXP-54cb1b965e5a6d6bd2475c909486468f5e6dd982.zip |
Issue #1053 - Remove android support from uriloader
Diffstat (limited to 'uriloader/exthandler/nsExternalHelperAppService.cpp')
-rw-r--r-- | uriloader/exthandler/nsExternalHelperAppService.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp index 455ac457a..49a54ea5f 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -99,10 +99,6 @@ #include "nsWindowsHelpers.h" #endif -#ifdef MOZ_WIDGET_ANDROID -#include "FennecJNIWrappers.h" -#endif - #include "mozilla/Preferences.h" #include "mozilla/ipc/URIUtils.h" @@ -322,36 +318,6 @@ static nsresult GetDownloadDirectory(nsIFile **_directory, getter_AddRefs(dir)); NS_ENSURE_SUCCESS(rv, rv); } -#elif defined(ANDROID) - // We ask Java for the temporary download directory. The directory will be - // different depending on whether we have the permission to write to the - // public download directory or not. - // In the case where we do not have the permission we will start the - // download to the app cache directory and later move it to the final - // destination after prompting for the permission. - jni::String::LocalRef downloadDir; - if (jni::IsFennec()) { - downloadDir = java::DownloadsIntegration::GetTemporaryDownloadDirectory(); - } - - nsresult rv; - if (downloadDir) { - nsCOMPtr<nsIFile> ldir; - rv = NS_NewNativeLocalFile(downloadDir->ToCString(), - true, getter_AddRefs(ldir)); - - NS_ENSURE_SUCCESS(rv, rv); - dir = do_QueryInterface(ldir); - - // If we're not checking for availability we're done. - if (aSkipChecks) { - dir.forget(_directory); - return NS_OK; - } - } - else { - return NS_ERROR_FAILURE; - } #else // On all other platforms, we default to the systems temporary directory. nsresult rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(dir)); @@ -523,9 +489,6 @@ static const nsExtraMimeTypeEntry extraMimeEntries[] = { APPLICATION_POSTSCRIPT, "ps,eps,ai", "Postscript File" }, { APPLICATION_XJAVASCRIPT, "js", "Javascript Source File" }, { APPLICATION_XJAVASCRIPT, "jsm", "Javascript Module Source File" }, -#ifdef MOZ_WIDGET_ANDROID - { "application/vnd.android.package-archive", "apk", "Android Package" }, -#endif { IMAGE_ART, "art", "ART Image" }, { IMAGE_BMP, "bmp", "BMP Image" }, { IMAGE_GIF, "gif", "GIF Image" }, @@ -1795,13 +1758,7 @@ void nsExternalAppHandler::SendStatusChange(ErrorType type, nsresult rv, nsIRequ case NS_ERROR_FILE_ACCESS_DENIED: if (type == kWriteError) { // Attempt to write without sufficient permissions. -#if defined(ANDROID) - // On Android (and Gonk), this means the SD card is present but - // unavailable (read-only). - msgId.AssignLiteral("SDAccessErrorCardReadOnly"); -#else msgId.AssignLiteral("accessError"); -#endif } else { msgId.AssignLiteral("launchError"); } @@ -1815,14 +1772,6 @@ void nsExternalAppHandler::SendStatusChange(ErrorType type, nsresult rv, nsIRequ msgId.AssignLiteral("helperAppNotFound"); break; } -#if defined(ANDROID) - else if (type == kWriteError) { - // On Android (and Gonk), this means the SD card is missing (not in - // SD slot). - msgId.AssignLiteral("SDAccessErrorCardMissing"); - break; - } -#endif MOZ_FALLTHROUGH; default: |