Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

fix:删除废弃api #727

Open
wants to merge 4 commits into
base: 0.11.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion android/src/main/java/com/RNFetchBlob/RNFetchBlobFS.java
Original file line number Diff line number Diff line change
@@ -215,7 +215,13 @@ static public Map<String, Object> getSystemfolders(ReactApplicationContext ctx)
state = Environment.getExternalStorageState();
if (state.equals(Environment.MEDIA_MOUNTED)) {
res.put("SDCardDir", Environment.getExternalStorageDirectory().getAbsolutePath());
res.put("SDCardApplicationDir", ctx.getExternalFilesDir(null).getParentFile().getAbsolutePath());
final File externalFilesDir = ctx.getExternalFilesDir(null);
if (externalFilesDir != null) {
final File parentFile = externalFilesDir.getParentFile();
if (parentFile != null) {
res.put("SDCardApplicationDir", parentFile.getAbsolutePath());
}
}
}
res.put("MainBundleDir", ctx.getApplicationInfo().dataDir);
return res;
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@ public List<NativeModule> createNativeModules(ReactApplicationContext reactConte
return modules;
}

@Override

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

保留方法,只删 @OverRide

public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}