mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
fix so wordlist upgrades work again
Not sure when this broke...
This commit is contained in:
parent
458eeb7176
commit
edc9d34654
2 changed files with 21 additions and 1 deletions
|
@ -2512,6 +2512,11 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
return result;
|
||||
}
|
||||
|
||||
private boolean downloadDictUpgrade( Intent intent )
|
||||
{
|
||||
return UpdateCheckReceiver.downloadPerNotification( m_activity, intent );
|
||||
}
|
||||
|
||||
private boolean startNewNetGame( NetLaunchInfo nli )
|
||||
{
|
||||
boolean handled = false;
|
||||
|
@ -2975,6 +2980,7 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
boolean handled = startFirstHasDict( intent )
|
||||
|| startWithInvitee( intent )
|
||||
|| postWordlistURL( intent )
|
||||
|| downloadDictUpgrade( intent )
|
||||
|| loadConfig( intent )
|
||||
|| startNewNetGame( intent )
|
||||
|| startHasGameID( intent )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*- compile-command: "find-and-gradle.sh inXw4dDeb"; -*- */
|
||||
/*
|
||||
* Copyright 2012 by Eric House (xwords@eehouse.org). All rights
|
||||
* Copyright 2012 - 2022 by Eric House (xwords@eehouse.org). All rights
|
||||
* reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -30,6 +30,7 @@ import android.content.pm.PackageManager;
|
|||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
@ -413,6 +414,19 @@ public class UpdateCheckReceiver extends BroadcastReceiver {
|
|||
body, url.hashCode() );
|
||||
}
|
||||
|
||||
static boolean downloadPerNotification( Context context, Intent intent )
|
||||
{
|
||||
String dictUri = intent.getStringExtra( NEW_DICT_URL );
|
||||
String name = intent.getStringExtra( NEW_DICT_NAME );
|
||||
boolean handled = !TextUtils.isEmpty( dictUri )
|
||||
&& !TextUtils.isEmpty( name );
|
||||
if ( handled ) {
|
||||
Uri uri = Uri.parse( dictUri );
|
||||
DwnldDelegate.downloadDictInBack( context, uri, name, null );
|
||||
}
|
||||
return handled;
|
||||
}
|
||||
|
||||
static boolean postedForDictDownload( Context context, final Uri uri,
|
||||
DwnldDelegate.DownloadFinishedListener dfl )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue