You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2015/07/07 02:32:21 UTC

cordova-plugin-file git commit: CB-9251: Changed from Intents to Preferences object as per the issue

Repository: cordova-plugin-file
Updated Branches:
  refs/heads/master c23e46cc1 -> f2cac259c


CB-9251: Changed from Intents to Preferences object as per the issue


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/f2cac259
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/f2cac259
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/f2cac259

Branch: refs/heads/master
Commit: f2cac259c17672d46415676f4f651a336758c124
Parents: c23e46c
Author: Joe Bowser <bo...@apache.org>
Authored: Mon Jul 6 17:32:11 2015 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Mon Jul 6 17:32:11 2015 -0700

----------------------------------------------------------------------
 src/android/FileUtils.java | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/f2cac259/src/android/FileUtils.java
----------------------------------------------------------------------
diff --git a/src/android/FileUtils.java b/src/android/FileUtils.java
index a803d15..64d8a3e 100644
--- a/src/android/FileUtils.java
+++ b/src/android/FileUtils.java
@@ -94,10 +94,7 @@ public class FileUtils extends CordovaPlugin {
     }
 
     protected String[] getExtraFileSystemsPreference(Activity activity) {
-        String fileSystemsStr = activity.getIntent().getStringExtra("androidextrafilesystems");
-        if (fileSystemsStr == null) {
-            fileSystemsStr = "files,files-external,documents,sdcard,cache,cache-external,root";
-        }
+        String fileSystemsStr = preferences.getString("androidextrafilesystems", "files,files-external,documents,sdcard,cache,cache-external,root");
         return fileSystemsStr.split(",");
     }
 
@@ -155,11 +152,9 @@ public class FileUtils extends CordovaPlugin {
 
     	Activity activity = cordova.getActivity();
     	String packageName = activity.getPackageName();
-    	
-    	String location = activity.getIntent().getStringExtra("androidpersistentfilelocation");
-    	if (location == null) {
-    		location = "compatibility";
-    	}
+
+        String location = preferences.getString("androidpersistentfilelocation", "compatibility");
+
     	tempRoot = activity.getCacheDir().getAbsolutePath();
     	if ("internal".equalsIgnoreCase(location)) {
     		persistentRoot = activity.getFilesDir().getAbsolutePath() + "/files/";


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org