From cb962b588727da7e7bf84d1da116fc8c30adde0e Mon Sep 17 00:00:00 2001 From: klzgrad Date: Wed, 30 Mar 2022 20:23:40 +0800 Subject: [PATCH] base: Remove JNI function on Android --- src/base/android/content_uri_utils_stub.cc | 18 +++++++++++------- src/base/files/file_util_android.cc | 12 ------------ 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/base/android/content_uri_utils_stub.cc b/src/base/android/content_uri_utils_stub.cc index 64f23649ad..7b4b8547ef 100644 --- a/src/base/android/content_uri_utils_stub.cc +++ b/src/base/android/content_uri_utils_stub.cc @@ -6,14 +6,22 @@ namespace base { -bool ContentUriExists(const FilePath& content_uri) { - return false; +std::optional TranslateOpenFlagsToJavaMode(uint32_t) { + return {}; } -File OpenContentUriForRead(const FilePath& content_uri) { +File OpenContentUri(const FilePath&, uint32_t) { return {}; } +int64_t GetContentUriFileSize(const FilePath&) { + return -1; +} + +bool ContentUriExists(const FilePath&) { + return false; +} + std::string GetContentUriMimeType(const FilePath& content_uri) { return {}; } @@ -27,8 +35,4 @@ bool DeleteContentUri(const FilePath& content_uri) { return false; } -FilePath GetContentUriFromFilePath(const FilePath& file_path) { - return {}; -} - } // namespace base diff --git a/src/base/files/file_util_android.cc b/src/base/files/file_util_android.cc index 52adc81b78..d2ba684201 100644 --- a/src/base/files/file_util_android.cc +++ b/src/base/files/file_util_android.cc @@ -4,22 +4,10 @@ #include "base/files/file_util.h" -#include "base/android/jni_string.h" #include "base/files/file_path.h" #include "base/path_service.h" -// Must come after all headers that specialize FromJniType() / ToJniType(). -#include "base/base_jni/FileUtils_jni.h" - namespace base { -namespace android { - -static std::string JNI_FileUtils_GetAbsoluteFilePath(JNIEnv* env, - std::string& file_path) { - return MakeAbsoluteFilePath(base::FilePath(file_path)).value(); -} - -} // namespace android bool GetShmemTempDir(bool executable, base::FilePath* path) { return PathService::Get(base::DIR_CACHE, path);