Skip to content

Commit f2cac25

Browse files
committed
CB-9251: Changed from Intents to Preferences object as per the issue
1 parent c23e46c commit f2cac25

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/android/FileUtils.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,7 @@ private Filesystem filesystemForName(String name) {
9494
}
9595

9696
protected String[] getExtraFileSystemsPreference(Activity activity) {
97-
String fileSystemsStr = activity.getIntent().getStringExtra("androidextrafilesystems");
98-
if (fileSystemsStr == null) {
99-
fileSystemsStr = "files,files-external,documents,sdcard,cache,cache-external,root";
100-
}
97+
String fileSystemsStr = preferences.getString("androidextrafilesystems", "files,files-external,documents,sdcard,cache,cache-external,root");
10198
return fileSystemsStr.split(",");
10299
}
103100

@@ -155,11 +152,9 @@ public void initialize(CordovaInterface cordova, CordovaWebView webView) {
155152

156153
Activity activity = cordova.getActivity();
157154
String packageName = activity.getPackageName();
158-
159-
String location = activity.getIntent().getStringExtra("androidpersistentfilelocation");
160-
if (location == null) {
161-
location = "compatibility";
162-
}
155+
156+
String location = preferences.getString("androidpersistentfilelocation", "compatibility");
157+
163158
tempRoot = activity.getCacheDir().getAbsolutePath();
164159
if ("internal".equalsIgnoreCase(location)) {
165160
persistentRoot = activity.getFilesDir().getAbsolutePath() + "/files/";

0 commit comments

Comments
 (0)