cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject [2/2] git commit: CB-5916: Android: Fix unfortunate NPE in config check
Date Tue, 28 Jan 2014 16:12:42 GMT
CB-5916: Android: Fix unfortunate NPE in config check


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

Branch: refs/heads/dev
Commit: b68e1278d038716728ab83ae9543bb52f2c58e04
Parents: 28c21bf
Author: Ian Clelland <iclelland@chromium.org>
Authored: Tue Jan 28 11:12:15 2014 -0500
Committer: Ian Clelland <iclelland@chromium.org>
Committed: Tue Jan 28 11:12:15 2014 -0500

----------------------------------------------------------------------
 src/android/FileUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/b68e1278/src/android/FileUtils.java
----------------------------------------------------------------------
diff --git a/src/android/FileUtils.java b/src/android/FileUtils.java
index f9a36a7..415d0e2 100644
--- a/src/android/FileUtils.java
+++ b/src/android/FileUtils.java
@@ -102,7 +102,7 @@ public class FileUtils extends CordovaPlugin {
     	String packageName = activity.getPackageName();
     	
     	String location = activity.getIntent().getStringExtra("androidpersistentfilelocation");
-    	if (!(location.equalsIgnoreCase("internal") || location.equalsIgnoreCase("compatibility")))
{
+    	if (location == null || !(location.equalsIgnoreCase("internal") || location.equalsIgnoreCase("compatibility")))
{
     		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();
     	}


Mime
View raw message