Repository: cordova-plugin-file Updated Branches: refs/heads/master 7a19febf0 -> 47a428f0d
Plugin uses Android Log class and not Cordova LOG class 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/47a428f0 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/47a428f0 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/47a428f0 Branch: refs/heads/master Commit: 47a428f0d94b1bac2caaf1659b391812f049bfa4 Parents: 7a19feb Author: Simon MacDonald <simon.macdon...@gmail.com> Authored: Mon Aug 22 16:19:35 2016 -0400 Committer: Simon MacDonald <simon.macdon...@gmail.com> Committed: Mon Aug 22 16:19:35 2016 -0400 ---------------------------------------------------------------------- src/android/AssetFilesystem.java | 8 ++++---- src/android/FileUtils.java | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/47a428f0/src/android/AssetFilesystem.java ---------------------------------------------------------------------- diff --git a/src/android/AssetFilesystem.java b/src/android/AssetFilesystem.java index 2266f3e..b035c40 100644 --- a/src/android/AssetFilesystem.java +++ b/src/android/AssetFilesystem.java @@ -20,9 +20,9 @@ package org.apache.cordova.file; import android.content.res.AssetManager; import android.net.Uri; -import android.util.Log; import org.apache.cordova.CordovaResourceApi; +import org.apache.cordova.LOG; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -65,12 +65,12 @@ public class AssetFilesystem extends Filesystem { try { ois.close(); } catch (IOException e) { - Log.d(LOG_TAG, e.getLocalizedMessage()); + LOG.d(LOG_TAG, e.getLocalizedMessage()); } } } if (listCache == null) { - Log.w("AssetFilesystem", "Asset manifest not found. Recursive copies and directory listing will be slow."); + LOG.w("AssetFilesystem", "Asset manifest not found. Recursive copies and directory listing will be slow."); listCache = new HashMap<String, String[]>(); } } @@ -127,7 +127,7 @@ public class AssetFilesystem extends Filesystem { try { offr.inputStream.close(); } catch (IOException e) { - Log.d(LOG_TAG, e.getLocalizedMessage()); + LOG.d(LOG_TAG, e.getLocalizedMessage()); } } } http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/47a428f0/src/android/FileUtils.java ---------------------------------------------------------------------- diff --git a/src/android/FileUtils.java b/src/android/FileUtils.java index 91e40e2..fc52d18 100644 --- a/src/android/FileUtils.java +++ b/src/android/FileUtils.java @@ -26,12 +26,12 @@ import android.net.Uri; import android.os.Build; import android.os.Environment; import android.util.Base64; -import android.util.Log; import org.apache.cordova.CallbackContext; import org.apache.cordova.CordovaInterface; import org.apache.cordova.CordovaPlugin; import org.apache.cordova.CordovaWebView; +import org.apache.cordova.LOG; import org.apache.cordova.PermissionHelper; import org.apache.cordova.PluginResult; @@ -139,10 +139,10 @@ public class FileUtils extends CordovaPlugin { registerFilesystem(new LocalFilesystem(fsName, webView.getContext(), webView.getResourceApi(), newRoot)); installedFileSystems.add(fsName); } else { - Log.d(LOG_TAG, "Unable to create root dir for filesystem \"" + fsName + "\", skipping"); + LOG.d(LOG_TAG, "Unable to create root dir for filesystem \"" + fsName + "\", skipping"); } } else { - Log.d(LOG_TAG, "Unrecognized extra filesystem identifier: " + fsName); + LOG.d(LOG_TAG, "Unrecognized extra filesystem identifier: " + fsName); } } } @@ -163,7 +163,7 @@ public class FileUtils extends CordovaPlugin { availableFileSystems.put("cache-external", context.getExternalCacheDir().getAbsolutePath()); } catch(NullPointerException e) { - Log.d(LOG_TAG, "External storage unavailable, check to see if USB Mass Storage Mode is on"); + LOG.d(LOG_TAG, "External storage unavailable, check to see if USB Mass Storage Mode is on"); } } @@ -229,7 +229,7 @@ public class FileUtils extends CordovaPlugin { FileUtils.filePlugin = this; } } else { - Log.e(LOG_TAG, "File plugin configuration error: Please set AndroidPersistentFileLocation in config.xml to one of \"internal\" (for new applications) or \"compatibility\" (for compatibility with previous versions)"); + LOG.e(LOG_TAG, "File plugin configuration error: Please set AndroidPersistentFileLocation in config.xml to one of \"internal\" (for new applications) or \"compatibility\" (for compatibility with previous versions)"); activity.finish(); } } @@ -998,7 +998,7 @@ public class FileUtils extends CordovaPlugin { } catch(NullPointerException e) { /* If external storage is unavailable, context.getExternal* returns null */ - Log.d(LOG_TAG, "Unable to access these paths, most liklely due to USB storage"); + LOG.d(LOG_TAG, "Unable to access these paths, most liklely due to USB storage"); } } return ret; @@ -1096,7 +1096,7 @@ public class FileUtils extends CordovaPlugin { callbackContext.sendPluginResult(result); } catch (IOException e) { - Log.d(LOG_TAG, e.getLocalizedMessage()); + LOG.d(LOG_TAG, e.getLocalizedMessage()); callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, NOT_READABLE_ERR)); } } @@ -1110,7 +1110,7 @@ public class FileUtils extends CordovaPlugin { } catch (FileNotFoundException e) { callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, NOT_FOUND_ERR)); } catch (IOException e) { - Log.d(LOG_TAG, e.getLocalizedMessage()); + LOG.d(LOG_TAG, e.getLocalizedMessage()); callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, NOT_READABLE_ERR)); } } @@ -1132,7 +1132,7 @@ public class FileUtils extends CordovaPlugin { throw new MalformedURLException("No installed handlers for this URL"); } - long x = fs.writeToFileAtURL(inputURL, data, offset, isBinary); Log.d("TEST",srcURLstr + ": "+x); return x; + long x = fs.writeToFileAtURL(inputURL, data, offset, isBinary); LOG.d("TEST",srcURLstr + ": "+x); return x; } catch (IllegalArgumentException e) { MalformedURLException mue = new MalformedURLException("Unrecognized filesystem URL"); mue.initCause(e); @@ -1216,7 +1216,7 @@ public class FileUtils extends CordovaPlugin { break; } } else { - Log.d(LOG_TAG, "Received permission callback for unknown request code"); + LOG.d(LOG_TAG, "Received permission callback for unknown request code"); } } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org