fix missing import (oops) and cleanup final scores stuff.

This commit is contained in:
eehouse 2010-02-27 18:03:36 +00:00
parent 6d1c09e756
commit 28edaa09e2
2 changed files with 6 additions and 8 deletions

View file

@ -72,7 +72,7 @@ public class BoardActivity extends Activity implements UtilCtxt {
public void run() {
m_timers[m_why] = null;
m_jniThread.handle( JNICmd.CMD_TIMER_FIRED,
m_why, m_when, m_handle );
m_why, m_when, m_handle );
}
}
@ -708,8 +708,7 @@ public class BoardActivity extends Activity implements UtilCtxt {
public void notifyGameOver()
{
m_jniThread.handle( JNIThread.JNICmd.CMD_POST_OVER,
R.string.finalscores_title );
m_jniThread.handle( JNIThread.JNICmd.CMD_POST_OVER );
}
public boolean warnIllegalWord( String[] words, int turn, boolean turnLost )

View file

@ -12,6 +12,7 @@ import android.os.Message;
import android.graphics.Paint;
import android.graphics.Rect;
import org.eehouse.android.xw4.R;
import org.eehouse.android.xw4.jni.CurGameInfo.DeviceRole;
public class JNIThread extends Thread {
@ -302,14 +303,12 @@ public class JNIThread extends Thread {
boolean gameOver = XwJNI.server_getGameIsOver( m_jniGamePtr );
sendForDialog( ((Integer)args[0]).intValue(),
XwJNI.model_writeGameHistory( m_jniGamePtr,
gameOver )
);
gameOver ) );
break;
case CMD_FINAL:
if ( XwJNI.server_getGameIsOver( m_jniGamePtr ) ) {
String msg = XwJNI.server_writeFinalScores( m_jniGamePtr );
sendForDialog( R.string.query_title, msg );
handle( JNICmd.CMD_POST_OVER );
} else {
Message.obtain( m_handler, QUERY_ENDGAME ).sendToTarget();
draw = true;
@ -321,7 +320,7 @@ public class JNIThread extends Thread {
break;
case CMD_POST_OVER:
sendForDialog( ((Integer)args[0]).intValue(),
sendForDialog( R.string.finalscores_title,
XwJNI.server_writeFinalScores( m_jniGamePtr ) );
break;