diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java index af9c35def..55f062fe8 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java @@ -137,47 +137,6 @@ public class DictsActivity extends ExpandableListActivity { || super.onOptionsItemSelected( item ); } - private static Intent mkDownloadIntent( Context context, String dict_url ) - { - Uri uri = Uri.parse( dict_url ); - Intent intent = new Intent( Intent.ACTION_VIEW, uri ); - intent.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK ); - return intent; - } - - private static Intent mkDownloadIntent( Context context, - int lang, String dict ) - { - String dict_url = Utils.makeDictUrl( context, lang, dict ); - return mkDownloadIntent( context, dict_url ); - } - - public static void launchAndDownload( Activity activity, int lang, - String name ) - { - Intent intent = new Intent( activity, DictsActivity.class ); - intent.putExtra( DictsDelegate.DICT_DOLAUNCH, true ); - if ( lang > 0 ) { - intent.putExtra( DictsDelegate.DICT_LANG_EXTRA, lang ); - } - if ( null != name ) { - Assert.assertTrue( lang != 0 ); - intent.putExtra( DictsDelegate.DICT_NAME_EXTRA, name ); - } - - activity.startActivity( intent ); - } - - public static void launchAndDownload( Activity activity, int lang ) - { - launchAndDownload( activity, lang, null ); - } - - public static void launchAndDownload( Activity activity ) - { - launchAndDownload( activity, 0, null ); - } - private static class SafePopupImpl implements SafePopup { public void doPopup( final Context context, View button, String curDict ) { diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfigDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfigDelegate.java index 479b9f1d5..8aaa8c684 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfigDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfigDelegate.java @@ -746,7 +746,7 @@ public class GameConfigDelegate extends DelegateBase (String)parentView.getItemAtPosition( position ); if ( chosen.equals( m_browseText ) ) { - DictsActivity.launchAndDownload( m_activity, + DictsDelegate.launchAndDownload( m_activity, m_gi.dictLang ); } } @@ -772,7 +772,7 @@ public class GameConfigDelegate extends DelegateBase String chosen = (String)parentView.getItemAtPosition( position ); if ( chosen.equals( m_browseText ) ) { - DictsActivity.launchAndDownload( m_activity ); + DictsDelegate.launchAndDownload( m_activity ); } else { m_gi.setLang( DictLangCache. getLangLangCode( m_activity, diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java index 3041fded6..ae65d8372 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesListDelegate.java @@ -144,7 +144,7 @@ public class GamesListDelegate extends DelegateBase public void onClick( DialogInterface dlg, int item ) { // no name, so user must pick if ( null == m_missingDictName ) { - DictsActivity + DictsDelegate .launchAndDownload( m_activity, m_missingDictLang ); } else {