cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject [1/2] cordova-plugin-file git commit: Gets rid of thread block error in File plugin
Date Tue, 02 Dec 2014 18:40:10 GMT
Repository: cordova-plugin-file
Updated Branches:
  refs/heads/master 82f803ea0 -> 5806acf38


Gets rid of thread block error in File plugin

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/3f12de4e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/3f12de4e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/3f12de4e

Branch: refs/heads/master
Commit: 3f12de4eaf48697fb6f087d25931af7150a2693f
Parents: 8ef744d
Author: skyserpent <qsoomro@gmail.com>
Authored: Wed Oct 22 01:31:35 2014 -0700
Committer: skyserpent <qsoomro@gmail.com>
Committed: Wed Oct 22 01:31:35 2014 -0700

----------------------------------------------------------------------
 src/android/FileUtils.java | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/3f12de4e/src/android/FileUtils.java
----------------------------------------------------------------------
diff --git a/src/android/FileUtils.java b/src/android/FileUtils.java
index d1d0f81..c04f8a3 100644
--- a/src/android/FileUtils.java
+++ b/src/android/FileUtils.java
@@ -352,7 +352,18 @@ public class FileUtils extends CordovaPlugin {
                 }
             }, callbackContext);
         } else if (action.equals("requestAllPaths")) {
-            callbackContext.success(requestAllPaths());
+            cordova.getThreadPool().execute(
+                    new Runnable() {
+                        public void run() {
+                        	try {
+					callbackContext.success(requestAllPaths());
+				} catch (JSONException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+                        }
+                    }
+            );
         } else if (action.equals("requestFileSystem")) {
             final int fstype=args.getInt(0);
             final long size = args.optLong(1);


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


Mime
View raw message