diff --git a/example/index.html b/example/index.html
index f3b5bb2b..b53776da 100644
--- a/example/index.html
+++ b/example/index.html
@@ -113,7 +113,7 @@
function init(){
document.addEventListener("touchmove", preventBehavior, false);
- document.addEventListener("deviceReady", deviceInfo, true);
+ document.addEventListener("deviceready", deviceInfo, true);
}
diff --git a/framework/assets/js/file.js b/framework/assets/js/file.js
index 838c0f10..e32bbfd7 100644
--- a/framework/assets/js/file.js
+++ b/framework/assets/js/file.js
@@ -128,7 +128,7 @@ FileMgr.prototype.createDirectory = function(dirName, successCallback, errorCall
{
this.successCallback = successCallback;
this.errorCallback = errorCallback;
- var test = FileUtils.createDirectory(dirName);
+ var test = FileUtil.createDirectory(dirName);
test ? successCallback() : errorCallback();
}
@@ -136,7 +136,7 @@ FileMgr.prototype.deleteDirectory = function(dirName, successCallback, errorCall
{
this.successCallback = successCallback;
this.errorCallback = errorCallback;
- var test = FileUtils.deleteDirectory(dirName);
+ var test = FileUtil.deleteDirectory(dirName);
test ? successCallback() : errorCallback();
}
@@ -144,7 +144,7 @@ FileMgr.prototype.deleteFile = function(fileName, successCallback, errorCallback
{
this.successCallback = successCallback;
this.errorCallback = errorCallback;
- FileUtils.deleteFile(fileName);
+ FileUtil.deleteFile(fileName);
test ? successCallback() : errorCallback();
}
@@ -158,7 +158,7 @@ FileMgr.prototype.getFreeDiskSpace = function(successCallback, errorCallback)
{
this.successCallback = successCallback;
this.errorCallback = errorCallback;
- this.freeDiskSpace = FileUtils.getFreeDiskSpace();
+ this.freeDiskSpace = FileUtil.getFreeDiskSpace();
(this.freeDiskSpace > 0) ? successCallback() : errorCallback();
}
}
diff --git a/framework/src/com/phonegap/DirectoryManager.java b/framework/src/com/phonegap/DirectoryManager.java
index dab57f9e..2b411a6a 100644
--- a/framework/src/com/phonegap/DirectoryManager.java
+++ b/framework/src/com/phonegap/DirectoryManager.java
@@ -8,7 +8,7 @@ import android.util.Log;
public class DirectoryManager {
- protected boolean testFileExists (String name){
+ protected static boolean testFileExists (String name){
boolean status;
if ((testSaveLocationExists())&&(!name.equals(""))){
File path = Environment.getExternalStorageDirectory();
@@ -20,7 +20,7 @@ public class DirectoryManager {
return status;
}
- protected long getFreeDiskSpace(){
+ protected static long getFreeDiskSpace(){
/*
* gets the available SD card free space or returns -1 if the SD card is not mounted.
*/
@@ -38,7 +38,7 @@ public class DirectoryManager {
return (freeSpace);
}
- protected boolean createDirectory(String directoryName){
+ protected static boolean createDirectory(String directoryName){
boolean status;
if ((testSaveLocationExists())&&(!directoryName.equals(""))){
File path = Environment.getExternalStorageDirectory();
@@ -50,7 +50,7 @@ public class DirectoryManager {
return status;
}
- protected boolean testSaveLocationExists(){
+ protected static boolean testSaveLocationExists(){
String sDCardStatus = Environment.getExternalStorageState();
boolean status;
if (sDCardStatus.equals(Environment.MEDIA_MOUNTED)){
@@ -60,7 +60,7 @@ public class DirectoryManager {
return status;
}
- protected boolean deleteDirectory(String fileName){
+ protected static boolean deleteDirectory(String fileName){
boolean status;
SecurityManager checker = new SecurityManager();
@@ -92,7 +92,7 @@ public class DirectoryManager {
return status;
}
- protected boolean deleteFile(String fileName){
+ protected static boolean deleteFile(String fileName){
boolean status;
SecurityManager checker = new SecurityManager();
@@ -117,7 +117,7 @@ public class DirectoryManager {
return status;
}
- private File constructFilePaths (String file1, String file2){
+ private static File constructFilePaths (String file1, String file2){
File newPath;
newPath = new File(file1+"/"+file2);
return newPath;
diff --git a/framework/src/com/phonegap/FileUtils.java b/framework/src/com/phonegap/FileUtils.java
index b1161ffc..ab1a616c 100644
--- a/framework/src/com/phonegap/FileUtils.java
+++ b/framework/src/com/phonegap/FileUtils.java
@@ -8,7 +8,6 @@ public class FileUtils {
WebView mView;
- DirectoryManager fileManager;
FileReader f_in;
FileWriter f_out;
@@ -18,26 +17,26 @@ public class FileUtils {
}
public int testSaveLocationExists(){
- if (fileManager.testSaveLocationExists())
+ if (DirectoryManager.testSaveLocationExists())
return 0;
else
return 1;
}
public long getFreeDiskSpace(){
- long freeDiskSpace=fileManager.getFreeDiskSpace();
+ long freeDiskSpace=DirectoryManager.getFreeDiskSpace();
return freeDiskSpace;
}
public int testFileExists(String file){
- if (fileManager.testFileExists(file))
+ if (DirectoryManager.testFileExists(file))
return 0;
else
return 1;
}
public int testDirectoryExists(String file){
- if (fileManager.testFileExists(file))
+ if (DirectoryManager.testFileExists(file))
return 0;
else
return 1;
@@ -49,7 +48,7 @@ public class FileUtils {
* TODO: JavaScript Call backs for success and error handling
*/
public int deleteDirectory (String dir){
- if (fileManager.deleteDirectory(dir))
+ if (DirectoryManager.deleteDirectory(dir))
return 0;
else
return 1;
@@ -61,7 +60,7 @@ public class FileUtils {
* TODO: JavaScript Call backs for success and error handling
*/
public int deleteFile (String file){
- if (fileManager.deleteFile(file))
+ if (DirectoryManager.deleteFile(file))
return 0;
else
return 1;
@@ -73,7 +72,7 @@ public class FileUtils {
* TODO: JavaScript Call backs for success and error handling
*/
public int createDirectory(String dir){
- if (fileManager.createDirectory(dir))
+ if (DirectoryManager.createDirectory(dir))
return 0;
else
return 1;