package com.makina.offline.mbtiles;

import org.apache.cordova.CordovaResourceApi;

import android.content.Context;
import android.net.Uri;

/**
 * {@link IMBTilesActions} SQLite implementation.
 * 
 * @author <a href="mailto:sebastien.grimault@makina-corpus.com">S. Grimault</a>
 */
public class MBTilesActionsCDVFileImpl extends MBTilesActionsGenDatabaseImpl
{
	
	public MBTilesActionsCDVFileImpl(Context context, String url, CordovaResourceApi resourceApi) {
		super(context);
		if (url != null && url.length() > 0) {
	 		if (FileUtils.checkExternalStorageState()) {
	 			url = "cdvfile://localhost/persistent/tiles/";
			}
		}
		
		if (url != null) {
			 Uri fileURL = resourceApi.remapUri(Uri.parse(url));
			 mDirectory = fileURL.getPath();
		}
	}
}

@@ -487,18 +487,18 @@
 url 
-!
+=
 = null 
-&&
+%7C%7C
  url
@@ -507,17 +507,18 @@
 ength() 
-%3E
+%3C=
  0) %7B%0A%09 

Fix Error in CDVFile on Android, wrong condition url