Changed current app to OpenTyrian

This commit is contained in:
pelya
2010-08-21 18:58:20 +03:00
parent 629f5b51f1
commit 9850a8e49f
13 changed files with 30 additions and 27 deletions

View File

@@ -1,5 +1,5 @@
// This string is autogenerated by ChangeAppSettings.sh, do not change spaces amount
package com.sourceforge.sc2;
package com.googlecode.opentyrian;
import android.app.Activity;
import android.content.Context;
@@ -174,13 +174,16 @@ class DataDownloader extends Thread
try {
byte b[] = new byte[ Globals.DataDownloadUrl.getBytes("UTF-8").length + 1 ];
int readed = checkFile.read(b);
String compare = new String( b, 0, b.length - 1, "UTF-8" );
if( readed != b.length - 1 )
throw new IOException();
String compare = new String( b, 0, readed, "UTF-8" );
boolean matched = false;
System.out.println("Read URL: '" + compare + "'");
for( int i = 1; i < downloadUrls.length; i++ )
{
System.out.println("Comparing: '" + downloadUrls[i] + "'");
if( compare.compareTo(downloadUrls[i]) == 0 )
matched = true;
}
System.out.println("Matched: " + String.valueOf(matched));
if( ! matched )
throw new IOException();
Status.setText( "No need to download" );