mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
cleanup: add additional param to downloadFinished() iface method
This commit is contained in:
parent
aec03fc572
commit
643a301214
4 changed files with 10 additions and 11 deletions
|
@ -256,7 +256,7 @@ public class BoardActivity extends XWActivity
|
|||
public void onClick( DialogInterface dlg,
|
||||
int whichButton ) {
|
||||
if ( DLG_USEDICT == id ) {
|
||||
setGotGameDict();
|
||||
setGotGameDict( m_getDict );
|
||||
} else {
|
||||
NetUtils.launchAndDownload( BoardActivity.this,
|
||||
m_gi.dictLang,
|
||||
|
@ -1049,23 +1049,22 @@ public class BoardActivity extends XWActivity
|
|||
//////////////////////////////////////////////////
|
||||
// NetUtils.DownloadFinishedListener interface
|
||||
//////////////////////////////////////////////////
|
||||
public void downloadFinished( final boolean success )
|
||||
public void downloadFinished( final String name, final boolean success )
|
||||
{
|
||||
if ( success ) {
|
||||
post( new Runnable() {
|
||||
public void run() {
|
||||
setGotGameDict();
|
||||
setGotGameDict( name );
|
||||
}
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
private void setGotGameDict()
|
||||
private void setGotGameDict( String getDict )
|
||||
{
|
||||
Assert.assertNotNull( m_getDict );
|
||||
m_jniThread.setSaveDict( m_getDict );
|
||||
m_jniThread.setSaveDict( getDict );
|
||||
|
||||
String msg = getString( R.string.reload_new_dict, m_getDict );
|
||||
String msg = getString( R.string.reload_new_dict, getDict );
|
||||
Utils.showToast( this, msg );
|
||||
finish();
|
||||
GameUtils.launchGame( this, m_rowid, false );
|
||||
|
|
|
@ -759,7 +759,7 @@ public class DictsActivity extends ExpandableListActivity
|
|||
}
|
||||
|
||||
// NetUtils.DownloadFinishedListener interface
|
||||
public void downloadFinished( final boolean success )
|
||||
public void downloadFinished( String name, final boolean success )
|
||||
{
|
||||
if ( m_launchedForMissing ) {
|
||||
m_handler.post( new Runnable() {
|
||||
|
|
|
@ -619,7 +619,7 @@ public class GamesList extends XWListActivity
|
|||
}
|
||||
|
||||
// NetUtils.DownloadFinishedListener interface
|
||||
public void downloadFinished( final boolean success )
|
||||
public void downloadFinished( String name, final boolean success )
|
||||
{
|
||||
post( new Runnable() {
|
||||
public void run() {
|
||||
|
|
|
@ -51,7 +51,7 @@ public class NetUtils {
|
|||
public static byte PRX_PUT_MSGS = 5;
|
||||
|
||||
public interface DownloadFinishedListener {
|
||||
void downloadFinished( boolean success );
|
||||
void downloadFinished( String name, boolean success );
|
||||
}
|
||||
|
||||
public static Socket makeProxySocket( Context context,
|
||||
|
@ -326,7 +326,7 @@ public class NetUtils {
|
|||
sno.close();
|
||||
DictLangCache.inval( context, name, loc, true );
|
||||
if ( null != lstnr ) {
|
||||
lstnr.downloadFinished( success );
|
||||
lstnr.downloadFinished( name, success );
|
||||
}
|
||||
}
|
||||
} ).start();
|
||||
|
|
Loading…
Reference in a new issue