project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/Downloader/DownloadAsyncTask.java
branchhedgeroid
changeset 5514 294c92eea729
parent 5412 ab055114c788
child 5621 ea796c83ea47
equal deleted inserted replaced
5512:e4cbfa6c1a6d 5514:294c92eea729
    34 	protected Long doInBackground(String... params) {
    34 	protected Long doInBackground(String... params) {
    35 		HttpURLConnection conn = null;
    35 		HttpURLConnection conn = null;
    36 		try {
    36 		try {
    37 			String rootZipDest = params[0];
    37 			String rootZipDest = params[0];
    38 
    38 
    39 			File rootDest = new File(rootZipDest);
    39 			File rootDest = new File(rootZipDest);//TODO check for nullpointer, it hints to the absence of an sdcard
    40 			rootDest.mkdir();
    40 			rootDest.mkdir();
    41 			
    41 			
    42 			URL url = new URL(params[1]);
    42 			URL url = new URL(params[1]);
    43 			conn = (HttpURLConnection)url.openConnection();
    43 			conn = (HttpURLConnection)url.openConnection();
    44 			String contentType = conn.getContentType();
    44 			String contentType = conn.getContentType();