fix log formatting problems

This commit is contained in:
Eric House 2023-02-21 17:22:38 -08:00
parent 28f86e37c2
commit ef9ff71d8a
5 changed files with 11 additions and 10 deletions

View file

@ -566,8 +566,8 @@ public class BoardCanvas extends Canvas implements DrawCtx {
public void score_pendingScore( Rect rect, int score, int playerNum, public void score_pendingScore( Rect rect, int score, int playerNum,
boolean curTurn, int flags ) boolean curTurn, int flags )
{ {
Log.d( TAG, "pendingScore(playerNum=%d, curTurn=%b)", // Log.d( TAG, "score_pendingScore(playerNum=%d, curTurn=%b)",
playerNum, curTurn ); // playerNum, curTurn );
int otherIndx = (0 == (flags & CELL_ISCURSOR)) int otherIndx = (0 == (flags & CELL_ISCURSOR))
? CommonPrefs.COLOR_BACKGRND : CommonPrefs.COLOR_FOCUS; ? CommonPrefs.COLOR_BACKGRND : CommonPrefs.COLOR_FOCUS;

View file

@ -699,8 +699,8 @@ public class MQTTUtils extends Thread
@Override @Override
public void onSuccess( IMqttToken asyncActionToken ) public void onSuccess( IMqttToken asyncActionToken )
{ {
Log.d( TAG, "%H.onSuccess(%s); cur state: %s", asyncActionToken, Log.d( TAG, "%H.onSuccess(%s); cur state: %s", this, asyncActionToken,
this, mState ); mState );
switch ( mState ) { switch ( mState ) {
case CONNECTING: case CONNECTING:
setState( State.CONNECTED ); setState( State.CONNECTED );
@ -709,7 +709,7 @@ public class MQTTUtils extends Thread
setState( State.SUBSCRIBED ); setState( State.SUBSCRIBED );
break; break;
default: default:
Log.e( TAG, "%H.onSuccess(): unexpected state %s", mState ); Log.e( TAG, "%H.onSuccess(): unexpected state %s", this, mState );
} }
} }

View file

@ -146,7 +146,7 @@ public class MultiMsgSink implements TransportProcs {
@Override @Override
public void countChanged( int newCount ) public void countChanged( int newCount )
{ {
Log.d( TAG, "countChanged(new=%d); dropping", newCount ); // Log.d( TAG, "countChanged(new=%d); dropping", newCount );
} }
public static boolean sendInvite( Context context, long rowid, public static boolean sendInvite( Context context, long rowid,

View file

@ -93,8 +93,8 @@ public class Toolbar implements BoardContainer.SizeChangeListener {
m_onClickListeners.put( index, new View.OnClickListener() { m_onClickListeners.put( index, new View.OnClickListener() {
@Override @Override
public void onClick( View view ) { public void onClick( View view ) {
Log.i( TAG, "setListener(): click on %s with action %s", // Log.i( TAG, "setListener(): click on %s with action %s",
view.toString(), action.toString() ); // view.toString(), action.toString() );
m_dlgDlgt.makeNotAgainBuilder( prefsKey, action, msgID ) m_dlgDlgt.makeNotAgainBuilder( prefsKey, action, msgID )
.show(); .show();
} }

View file

@ -104,10 +104,10 @@ public class XwJNI {
release(); release();
} }
// @Override @Override
public void finalize() throws java.lang.Throwable public void finalize() throws java.lang.Throwable
{ {
if ( BuildConfig.DEBUG && (0 != m_refCount || 0 != m_ptrGame) ) { if ( BuildConfig.NON_RELEASE && (0 != m_refCount || 0 != m_ptrGame) ) {
Log.e( TAG, "finalize(): called prematurely: refCount: %d" Log.e( TAG, "finalize(): called prematurely: refCount: %d"
+ "; ptr: %d; creator: %s", m_refCount, m_ptrGame, mStack ); + "; ptr: %d; creator: %s", m_refCount, m_ptrGame, mStack );
} }
@ -309,6 +309,7 @@ public class XwJNI {
private static GamePtr initGameJNI( long rowid ) private static GamePtr initGameJNI( long rowid )
{ {
long ptr = gameJNIInit( getJNI().m_ptrGlobals ); long ptr = gameJNIInit( getJNI().m_ptrGlobals );
Assert.assertTrueNR( 0 != ptr ); // should be impossible
GamePtr result = 0 == ptr ? null : new GamePtr( ptr, rowid ); GamePtr result = 0 == ptr ? null : new GamePtr( ptr, rowid );
return result; return result;
} }