mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-06 05:24:46 +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,
|
public void onClick( DialogInterface dlg,
|
||||||
int whichButton ) {
|
int whichButton ) {
|
||||||
if ( DLG_USEDICT == id ) {
|
if ( DLG_USEDICT == id ) {
|
||||||
setGotGameDict();
|
setGotGameDict( m_getDict );
|
||||||
} else {
|
} else {
|
||||||
NetUtils.launchAndDownload( BoardActivity.this,
|
NetUtils.launchAndDownload( BoardActivity.this,
|
||||||
m_gi.dictLang,
|
m_gi.dictLang,
|
||||||
|
@ -1049,23 +1049,22 @@ public class BoardActivity extends XWActivity
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
// NetUtils.DownloadFinishedListener interface
|
// NetUtils.DownloadFinishedListener interface
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
public void downloadFinished( final boolean success )
|
public void downloadFinished( final String name, final boolean success )
|
||||||
{
|
{
|
||||||
if ( success ) {
|
if ( success ) {
|
||||||
post( new Runnable() {
|
post( new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
setGotGameDict();
|
setGotGameDict( name );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setGotGameDict()
|
private void setGotGameDict( String getDict )
|
||||||
{
|
{
|
||||||
Assert.assertNotNull( m_getDict );
|
m_jniThread.setSaveDict( getDict );
|
||||||
m_jniThread.setSaveDict( m_getDict );
|
|
||||||
|
|
||||||
String msg = getString( R.string.reload_new_dict, m_getDict );
|
String msg = getString( R.string.reload_new_dict, getDict );
|
||||||
Utils.showToast( this, msg );
|
Utils.showToast( this, msg );
|
||||||
finish();
|
finish();
|
||||||
GameUtils.launchGame( this, m_rowid, false );
|
GameUtils.launchGame( this, m_rowid, false );
|
||||||
|
|
|
@ -759,7 +759,7 @@ public class DictsActivity extends ExpandableListActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
// NetUtils.DownloadFinishedListener interface
|
// NetUtils.DownloadFinishedListener interface
|
||||||
public void downloadFinished( final boolean success )
|
public void downloadFinished( String name, final boolean success )
|
||||||
{
|
{
|
||||||
if ( m_launchedForMissing ) {
|
if ( m_launchedForMissing ) {
|
||||||
m_handler.post( new Runnable() {
|
m_handler.post( new Runnable() {
|
||||||
|
|
|
@ -619,7 +619,7 @@ public class GamesList extends XWListActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
// NetUtils.DownloadFinishedListener interface
|
// NetUtils.DownloadFinishedListener interface
|
||||||
public void downloadFinished( final boolean success )
|
public void downloadFinished( String name, final boolean success )
|
||||||
{
|
{
|
||||||
post( new Runnable() {
|
post( new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class NetUtils {
|
||||||
public static byte PRX_PUT_MSGS = 5;
|
public static byte PRX_PUT_MSGS = 5;
|
||||||
|
|
||||||
public interface DownloadFinishedListener {
|
public interface DownloadFinishedListener {
|
||||||
void downloadFinished( boolean success );
|
void downloadFinished( String name, boolean success );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Socket makeProxySocket( Context context,
|
public static Socket makeProxySocket( Context context,
|
||||||
|
@ -326,7 +326,7 @@ public class NetUtils {
|
||||||
sno.close();
|
sno.close();
|
||||||
DictLangCache.inval( context, name, loc, true );
|
DictLangCache.inval( context, name, loc, true );
|
||||||
if ( null != lstnr ) {
|
if ( null != lstnr ) {
|
||||||
lstnr.downloadFinished( success );
|
lstnr.downloadFinished( name, success );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ).start();
|
} ).start();
|
||||||
|
|
Loading…
Reference in a new issue