mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
fix warnings flagged by Eclipse
This commit is contained in:
parent
99847cd0c5
commit
b4f40627ae
18 changed files with 3 additions and 86 deletions
|
@ -8,19 +8,14 @@ import android.view.Menu;
|
|||
import android.view.MenuItem;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.KeyEvent;
|
||||
import android.content.res.AssetManager;
|
||||
import java.io.InputStream;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileInputStream;
|
||||
import android.content.Intent;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import android.net.Uri;
|
||||
import android.app.Dialog;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.res.Resources;
|
||||
import android.widget.Toast;
|
||||
import junit.framework.Assert;
|
||||
import android.content.res.Configuration;
|
||||
|
@ -61,7 +56,6 @@ public class BoardActivity extends Activity implements UtilCtxt {
|
|||
private JNIThread m_jniThread;
|
||||
|
||||
public class TimerRunnable implements Runnable {
|
||||
private int m_gamePtr;
|
||||
private int m_why;
|
||||
private int m_when;
|
||||
private int m_handle;
|
||||
|
|
|
@ -14,7 +14,6 @@ import android.view.MotionEvent;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Paint.FontMetrics;
|
||||
import android.graphics.Paint.FontMetricsInt;
|
||||
import junit.framework.Assert;
|
||||
|
||||
|
@ -374,7 +373,6 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
|||
} else {
|
||||
m_fillPaint.setColor( foreColor );
|
||||
if ( null == bitmaps ) {
|
||||
int useHt = rect.height() - 4;
|
||||
drawCentered( text, rect, m_fontDims );
|
||||
} else {
|
||||
drawBestBitmap( bitmaps, rect );
|
||||
|
@ -546,7 +544,7 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
|||
BitmapDrawable[] bitmaps, int val,
|
||||
int flags, boolean clearBack )
|
||||
{
|
||||
boolean valHidden = (flags & CELL_VALHIDDEN) != 0;
|
||||
// boolean valHidden = (flags & CELL_VALHIDDEN) != 0;
|
||||
boolean notEmpty = (flags & CELL_ISEMPTY) == 0;
|
||||
boolean isCursor = (flags & CELL_ISCURSOR) != 0;
|
||||
|
||||
|
@ -666,7 +664,7 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
|||
Bitmap.Config.ARGB_8888 );
|
||||
Canvas canvas = new Canvas( bitmap );
|
||||
|
||||
FontMetrics fmi = paint.getFontMetrics();
|
||||
// FontMetrics fmi = paint.getFontMetrics();
|
||||
// Utils.logf( "ascent: " + fmi.ascent );
|
||||
// Utils.logf( "bottom: " + fmi.bottom );
|
||||
// Utils.logf( "descent: " + fmi.descent );
|
||||
|
|
|
@ -5,7 +5,6 @@ package org.eehouse.android.xw4;
|
|||
import java.nio.channels.Selector;
|
||||
import java.nio.channels.SocketChannel;
|
||||
import java.nio.channels.SelectionKey;
|
||||
import java.nio.channels.spi.SelectorProvider;
|
||||
import java.nio.channels.ClosedChannelException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.net.InetSocketAddress;
|
||||
|
@ -21,7 +20,6 @@ import android.os.Message;
|
|||
|
||||
import org.eehouse.android.xw4.jni.*;
|
||||
import org.eehouse.android.xw4.jni.JNIThread.*;
|
||||
import org.eehouse.android.xw4.jni.CommsAddrRec.CommsConnType;
|
||||
import org.eehouse.android.xw4.jni.CurGameInfo.DeviceRole;
|
||||
|
||||
public class CommsTransport extends Thread implements TransportProcs {
|
||||
|
@ -43,7 +41,6 @@ public class CommsTransport extends Thread implements TransportProcs {
|
|||
private ByteBuffer m_bytesIn;
|
||||
|
||||
private Context m_context;
|
||||
private DeviceRole m_role;
|
||||
|
||||
// assembling inbound packet
|
||||
private byte[] m_packetIn;
|
||||
|
@ -55,7 +52,6 @@ public class CommsTransport extends Thread implements TransportProcs {
|
|||
m_jniGamePtr = jniGamePtr;
|
||||
m_context = context;
|
||||
m_handler = handler;
|
||||
m_role = role;
|
||||
m_buffersOut = new Vector<ByteBuffer>();
|
||||
m_bytesIn = ByteBuffer.allocate( 2048 );
|
||||
}
|
||||
|
@ -118,7 +114,7 @@ public class CommsTransport extends Thread implements TransportProcs {
|
|||
break;
|
||||
}
|
||||
|
||||
Iterator iter = m_selector.selectedKeys().iterator();
|
||||
Iterator<SelectionKey> iter = m_selector.selectedKeys().iterator();
|
||||
while ( iter.hasNext() ) {
|
||||
SelectionKey key = (SelectionKey)iter.next();
|
||||
SocketChannel channel = (SocketChannel)key.channel();
|
||||
|
|
|
@ -3,14 +3,10 @@
|
|||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ListActivity;
|
||||
import android.webkit.WebView;
|
||||
import android.os.Bundle;
|
||||
import android.webkit.DownloadListener;
|
||||
|
||||
import org.eehouse.android.xw4.jni.*;
|
||||
|
||||
|
||||
public class DictActivity extends Activity {
|
||||
|
||||
private WebView m_webview;
|
||||
|
|
|
@ -19,35 +19,17 @@
|
|||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ComponentName;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import java.util.ArrayList;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.EditText;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemSelectedListener;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ListAdapter;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import java.io.PrintStream;
|
||||
import java.io.FileOutputStream;
|
||||
import android.text.Editable;
|
||||
import android.database.DataSetObserver;
|
||||
import android.app.Dialog;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -56,13 +38,9 @@ import android.widget.CheckBox;
|
|||
import android.widget.CompoundButton;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.MenuInflater;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.webkit.WebView;
|
||||
import java.io.File;
|
||||
import android.widget.LinearLayout;
|
||||
import junit.framework.Assert;
|
||||
|
||||
|
@ -89,7 +67,6 @@ public class GameConfig extends Activity implements View.OnClickListener {
|
|||
private int m_browsePosition;
|
||||
private LinearLayout m_playerLayout;
|
||||
private CommsAddrRec m_car;
|
||||
private int m_connLayoutID;
|
||||
private CommonPrefs m_cp;
|
||||
private boolean m_canDoSMS = false;
|
||||
private boolean m_canDoBT = false;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.widget.Adapter;
|
||||
import android.widget.ListAdapter;
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
|
@ -10,8 +9,6 @@ import android.view.ViewGroup;
|
|||
import android.widget.TextView;
|
||||
import android.database.DataSetObserver;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.CharBuffer;
|
||||
|
||||
import org.eehouse.android.xw4.jni.*;
|
||||
import org.eehouse.android.xw4.jni.CurGameInfo.DeviceRole;
|
||||
|
|
|
@ -18,13 +18,9 @@
|
|||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.app.ListActivity;
|
||||
import android.content.ComponentName;
|
||||
import android.content.ContentUris;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
@ -32,12 +28,8 @@ import android.view.View;
|
|||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.SimpleCursorAdapter;
|
||||
import android.content.res.AssetManager;
|
||||
import java.io.InputStream;
|
||||
import android.widget.Button;
|
||||
import android.view.MenuInflater;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.File;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
|
@ -46,7 +38,6 @@ import org.eehouse.android.xw4.jni.*;
|
|||
import org.eehouse.android.xw4.XWords4.Games; // for constants
|
||||
|
||||
public class GamesList extends ListActivity implements View.OnClickListener {
|
||||
private static final String TAG = "GamesList";
|
||||
private GameListAdapter m_adapter;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.widget.TextView;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
|
|
|
@ -3,23 +3,10 @@
|
|||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.content.Intent;
|
||||
import android.app.Dialog;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.res.Configuration;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import org.eehouse.android.xw4.jni.*;
|
||||
|
||||
public class PrefsActivity extends PreferenceActivity {
|
||||
|
||||
private Button m_doneB;
|
||||
private CommonPrefs m_cp;
|
||||
|
||||
@Override
|
||||
protected void onCreate( Bundle savedInstanceState )
|
||||
{
|
||||
|
|
|
@ -8,8 +8,6 @@ import android.content.Intent;
|
|||
import android.os.Bundle;
|
||||
import android.telephony.SmsMessage;
|
||||
|
||||
import org.eehouse.android.xw4.jni.*;
|
||||
|
||||
public class ReceiveNBS extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,13 +3,10 @@
|
|||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import org.eehouse.android.xw4.jni.*;
|
||||
|
||||
public class StatusReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,9 +21,6 @@ import android.widget.TextView;
|
|||
import android.text.format.Time;
|
||||
import java.util.Formatter;
|
||||
|
||||
import org.eehouse.android.xw4.jni.*;
|
||||
import org.eehouse.android.xw4.jni.JNIThread.*;
|
||||
|
||||
public class Utils {
|
||||
static final String TAG = "EJAVA";
|
||||
// private static JNIThread s_jniThread = null;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
package org.eehouse.android.xw4.jni;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
public interface BoardHandler {
|
||||
|
||||
void startHandling( JNIThread thread, int gamePtr, CurGameInfo gi );
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
package org.eehouse.android.xw4.jni;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import android.content.Context;
|
||||
|
||||
import org.eehouse.android.xw4.Utils;
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
package org.eehouse.android.xw4.jni;
|
||||
|
||||
import android.view.View;
|
||||
import org.eehouse.android.xw4.Utils;
|
||||
import java.lang.InterruptedException;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
@ -11,7 +10,6 @@ import android.os.Handler;
|
|||
import android.os.Message;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.eehouse.android.xw4.R;
|
||||
import org.eehouse.android.xw4.jni.CurGameInfo.DeviceRole;
|
||||
|
|
|
@ -51,7 +51,6 @@ public class JNIUtilsImpl implements JNIUtils {
|
|||
public String[] splitFaces( byte[] chars )
|
||||
{
|
||||
ArrayList<String> al = new ArrayList<String>();
|
||||
int ii = 0;
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream( chars );
|
||||
InputStreamReader isr = new InputStreamReader( bais );
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@ public class LocalPlayer {
|
|||
public boolean isRobot;
|
||||
public boolean isLocal;
|
||||
|
||||
private LocalPlayer() {}
|
||||
|
||||
public LocalPlayer( int num )
|
||||
{
|
||||
isLocal = true;
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
package org.eehouse.android.xw4.jni;
|
||||
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
|
||||
public interface UtilCtxt {
|
||||
static final int BONUS_NONE = 0;
|
||||
static final int BONUS_DOUBLE_LETTER = 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue