diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java index 01248f91c..82314c716 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardActivity.java @@ -35,7 +35,6 @@ import android.content.Intent; import java.util.concurrent.Semaphore; import java.util.ArrayList; import java.util.Iterator; -import android.net.Uri; import android.app.Dialog; import android.app.AlertDialog; import android.app.ProgressDialog; @@ -79,7 +78,6 @@ public class BoardActivity extends XWActivity private Handler m_handler; private TimerRunnable[] m_timers; private String m_name; - private Uri m_uri; private Toolbar m_toolbar; private ArrayList m_pendingChats = new ArrayList(); @@ -1221,8 +1219,9 @@ public class BoardActivity extends XWActivity private void startChatActivity() { - Intent intent = new Intent( Intent.ACTION_EDIT, - m_uri, this, ChatActivity.class ); + Intent intent = new Intent( this, ChatActivity.class ); + intent.setAction( Intent.ACTION_EDIT ); + intent.putExtra( BoardActivity.INTENT_KEY_NAME, m_name ); startActivityForResult( intent, CHAT_REQUEST ); } 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 44bd4731f..02bc6646f 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsActivity.java @@ -528,7 +528,8 @@ public class DictsActivity extends ExpandableListActivity return intent; } - public static void launchAndDownload( Activity activity, int lang, String name ) + public static void launchAndDownload( Activity activity, int lang, + String name ) { Intent intent = new Intent( activity, DictsActivity.class ); intent.putExtra( DICT_DOLAUNCH, true ); diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java index 4d2df3dcb..a1c739370 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java @@ -25,7 +25,6 @@ import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.view.LayoutInflater; -import android.net.Uri; import junit.framework.Assert; import android.view.View; import android.widget.TextView; diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java index 252db02a6..4cc635dad 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfig.java @@ -22,7 +22,6 @@ package org.eehouse.android.xw4; import android.app.Activity; import android.content.Intent; -import android.net.Uri; import android.os.Bundle; import java.io.File; import java.util.ArrayList; @@ -373,15 +372,10 @@ public class GameConfig extends XWActivity m_cp = CommonPrefs.get( this ); Intent intent = getIntent(); - Uri uri = intent.getData(); - m_path = uri.getPath(); - if ( m_path.charAt(0) == '/' ) { - m_path = m_path.substring( 1 ); - } + m_path = intent.getStringExtra( BoardActivity.INTENT_KEY_NAME ); setContentView(R.layout.game_config); - m_connectSet = findViewById(R.id.connect_set); m_addPlayerButton = (Button)findViewById(R.id.add_player); m_addPlayerButton.setOnClickListener( this ); diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java index a382fc213..78eb88b76 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java @@ -29,7 +29,6 @@ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.nio.channels.FileChannel; -import android.net.Uri; import java.util.ArrayList; import java.util.Arrays; import android.content.res.AssetManager; @@ -836,8 +835,9 @@ public class GameUtils { public static void doConfig( Activity activity, String path, Class clazz ) { - Uri uri = Uri.fromFile( new File(path) ); - Intent intent = new Intent( Intent.ACTION_EDIT, uri, activity, clazz ); + Intent intent = new Intent( activity, clazz ); + intent.setAction( Intent.ACTION_EDIT ); + intent.putExtra( BoardActivity.INTENT_KEY_NAME, path ); activity.startActivity( intent ); } diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java index 81fb954b6..c93fb12ba 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GamesList.java @@ -28,7 +28,6 @@ import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.DialogInterface; -import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.view.ContextMenu; diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/RelayGameActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/RelayGameActivity.java index ed3c5b473..fc603a5ea 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/RelayGameActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/RelayGameActivity.java @@ -28,7 +28,6 @@ package org.eehouse.android.xw4; import android.app.Activity; import java.io.File; import android.os.Bundle; -import android.net.Uri; import android.widget.Button; import android.widget.TextView; import android.view.View; @@ -54,11 +53,7 @@ public class RelayGameActivity extends XWActivity setContentView( R.layout.relay_game_config ); - Uri uri = getIntent().getData(); - m_path = uri.getPath(); - if ( m_path.charAt(0) == '/' ) { - m_path = m_path.substring( 1 ); - } + m_path = getIntent().getStringExtra( BoardActivity.INTENT_KEY_NAME ); m_playButton = (Button)findViewById( R.id.play_button ); m_playButton.setOnClickListener( this ); diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWActivity.java index 7d479bfba..18c9f9d95 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWActivity.java @@ -25,7 +25,6 @@ import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.view.LayoutInflater; -import android.net.Uri; import junit.framework.Assert; import android.view.View; import android.widget.TextView;