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

@ -708,8 +708,7 @@ public class BoardActivity extends Activity implements UtilCtxt {
public void notifyGameOver() public void notifyGameOver()
{ {
m_jniThread.handle( JNIThread.JNICmd.CMD_POST_OVER, m_jniThread.handle( JNIThread.JNICmd.CMD_POST_OVER );
R.string.finalscores_title );
} }
public boolean warnIllegalWord( String[] words, int turn, boolean turnLost ) 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.Paint;
import android.graphics.Rect; import android.graphics.Rect;
import org.eehouse.android.xw4.R;
import org.eehouse.android.xw4.jni.CurGameInfo.DeviceRole; import org.eehouse.android.xw4.jni.CurGameInfo.DeviceRole;
public class JNIThread extends Thread { public class JNIThread extends Thread {
@ -302,14 +303,12 @@ public class JNIThread extends Thread {
boolean gameOver = XwJNI.server_getGameIsOver( m_jniGamePtr ); boolean gameOver = XwJNI.server_getGameIsOver( m_jniGamePtr );
sendForDialog( ((Integer)args[0]).intValue(), sendForDialog( ((Integer)args[0]).intValue(),
XwJNI.model_writeGameHistory( m_jniGamePtr, XwJNI.model_writeGameHistory( m_jniGamePtr,
gameOver ) gameOver ) );
);
break; break;
case CMD_FINAL: case CMD_FINAL:
if ( XwJNI.server_getGameIsOver( m_jniGamePtr ) ) { if ( XwJNI.server_getGameIsOver( m_jniGamePtr ) ) {
String msg = XwJNI.server_writeFinalScores( m_jniGamePtr ); handle( JNICmd.CMD_POST_OVER );
sendForDialog( R.string.query_title, msg );
} else { } else {
Message.obtain( m_handler, QUERY_ENDGAME ).sendToTarget(); Message.obtain( m_handler, QUERY_ENDGAME ).sendToTarget();
draw = true; draw = true;
@ -321,7 +320,7 @@ public class JNIThread extends Thread {
break; break;
case CMD_POST_OVER: case CMD_POST_OVER:
sendForDialog( ((Integer)args[0]).intValue(), sendForDialog( R.string.finalscores_title,
XwJNI.server_writeFinalScores( m_jniGamePtr ) ); XwJNI.server_writeFinalScores( m_jniGamePtr ) );
break; break;