fix so wordlist upgrades work again

Not sure when this broke...
This commit is contained in:
Eric House 2022-09-11 21:18:57 -07:00
parent 458eeb7176
commit edc9d34654
2 changed files with 21 additions and 1 deletions

View file

@ -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 )

View file

@ -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 )
{