Editable data download path/application curdir, editable app commandline, updated teadme

This commit is contained in:
pelya
2010-12-29 12:55:44 +00:00
parent 3fdcecc38c
commit 154e2e3eda
12 changed files with 123 additions and 58 deletions

View File

@@ -148,9 +148,7 @@ class DataDownloader extends Thread
Parent = _Parent;
Status = new StatusWriter( _Status, _Parent );
//Status.setText( "Connecting to " + Globals.DataDownloadUrl );
outFilesDir = Parent.getFilesDir().getAbsolutePath();
if( Globals.DownloadToSdcard )
outFilesDir = Environment.getExternalStorageDirectory().getAbsolutePath() + "/app-data/" + Globals.class.getPackage().getName();
outFilesDir = Globals.DataDir;
DownloadComplete = false;
this.start();
}
@@ -217,18 +215,15 @@ class DataDownloader extends Thread
checkFile = null;
// Create output directory (not necessary for phone storage)
if( Globals.DownloadToSdcard )
{
try {
(new File( outFilesDir )).mkdirs();
OutputStream out = new FileOutputStream( getOutFilePath(".nomedia") );
out.flush();
out.close();
}
catch( SecurityException e ) {}
catch( FileNotFoundException e ) {}
catch( IOException e ) {};
try {
(new File( outFilesDir )).mkdirs();
OutputStream out = new FileOutputStream( getOutFilePath(".nomedia") );
out.flush();
out.close();
}
catch( SecurityException e ) {}
catch( FileNotFoundException e ) {}
catch( IOException e ) {};
HttpResponse response = null;
HttpGet request;