mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
get rid of the other places where Uri's being used but a simple name
is needed.
This commit is contained in:
parent
c46015c514
commit
84572c1ed6
8 changed files with 10 additions and 24 deletions
|
@ -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<String> m_pendingChats = new ArrayList<String>();
|
||||
|
||||
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue