base: Remove JNI function on Android

This commit is contained in:
klzgrad 2022-03-30 20:23:40 +08:00
parent 1d80429e28
commit 100c34ac00
2 changed files with 1 additions and 13 deletions

View File

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

View File

@ -990,7 +990,7 @@ bool GetFileInfo(const FilePath& file_path, File::Info* results) {
// Fstat on a virtual content-uri will get size=0 and last_modified=now.
// Fix size, and set last_modified=0 to at least make it stable.
if (success && results->size == 0) {
int64_t size = GetContentUriFileSize(file_path);
int64_t size = 0;
if (size >= 0) {
results->size = size;
results->last_modified = Time();