mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
get dict info immediately after install
I want Custom to show up as soon as you install a BYOD wordlist.
This commit is contained in:
parent
e3f9e6f32b
commit
99b4af8e53
2 changed files with 14 additions and 1 deletions
|
@ -185,6 +185,8 @@ public class DwnldDelegate extends ListDelegateBase {
|
|||
m_appFile = saveToPrivate( is, name, this );
|
||||
} else {
|
||||
m_savedDict = saveDict( is, name, this );
|
||||
// force a check so BYOD lists will show as custom
|
||||
UpdateCheckReceiver.checkDictVersions( m_activity );
|
||||
}
|
||||
is.close();
|
||||
} catch ( java.net.URISyntaxException use ) {
|
||||
|
|
|
@ -121,6 +121,17 @@ public class UpdateCheckReceiver extends BroadcastReceiver {
|
|||
}
|
||||
|
||||
public static void checkVersions( Context context, boolean fromUI )
|
||||
{
|
||||
checkVersions( context, fromUI, false );
|
||||
}
|
||||
|
||||
public static void checkDictVersions( Context context )
|
||||
{
|
||||
checkVersions( context, false, true );
|
||||
}
|
||||
|
||||
private static void checkVersions( Context context, boolean fromUI,
|
||||
boolean dictsOnly )
|
||||
{
|
||||
JSONObject params = new JSONObject();
|
||||
PackageManager pm = context.getPackageManager();
|
||||
|
@ -134,7 +145,7 @@ public class UpdateCheckReceiver extends BroadcastReceiver {
|
|||
}
|
||||
|
||||
// App update
|
||||
if ( BuildConfig.FOR_FDROID ) {
|
||||
if ( BuildConfig.FOR_FDROID || dictsOnly ) {
|
||||
// Do nothing; can't upgrade app
|
||||
} else {
|
||||
String installer = pm.getInstallerPackageName( packageName );
|
||||
|
|
Loading…
Reference in a new issue