mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-22 07:28:16 +01:00
log rather than assert when game opened twice
This commit is contained in:
parent
0fa43a7394
commit
b5e484baa5
1 changed files with 9 additions and 4 deletions
|
@ -492,7 +492,7 @@ public class BoardDelegate extends DelegateBase
|
||||||
m_rowid = args.getLong( GameUtils.INTENT_KEY_ROWID, -1 );
|
m_rowid = args.getLong( GameUtils.INTENT_KEY_ROWID, -1 );
|
||||||
Log.i( TAG, "opening rowid %d", m_rowid );
|
Log.i( TAG, "opening rowid %d", m_rowid );
|
||||||
m_overNotShown = true;
|
m_overNotShown = true;
|
||||||
noteOpened( m_rowid );
|
noteOpened( m_activity, m_rowid );
|
||||||
} // init
|
} // init
|
||||||
|
|
||||||
private void getLock()
|
private void getLock()
|
||||||
|
@ -3043,12 +3043,17 @@ public class BoardDelegate extends DelegateBase
|
||||||
// This might need to map rowid->openCount so opens can stack
|
// This might need to map rowid->openCount so opens can stack
|
||||||
static Set<Long> sOpenRows = new HashSet<>();
|
static Set<Long> sOpenRows = new HashSet<>();
|
||||||
|
|
||||||
private static void noteOpened( long rowid )
|
private static void noteOpened( Context context, long rowid )
|
||||||
{
|
{
|
||||||
Log.d( TAG, "noteOpened(%d)", rowid );
|
Log.d( TAG, "noteOpened(%d)", rowid );
|
||||||
Assert.assertTrueNR( !sOpenRows.contains(rowid) );
|
if ( BuildConfig.NON_RELEASE && sOpenRows.contains(rowid) ) {
|
||||||
|
String msg = String.format( "noteOpened(%d): already open", rowid );
|
||||||
|
Utils.showToast( context, msg );
|
||||||
|
DbgUtils.printStack( TAG );
|
||||||
|
} else {
|
||||||
sOpenRows.add( rowid );
|
sOpenRows.add( rowid );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void noteClosed( long rowid )
|
private static void noteClosed( long rowid )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue