add assert toward tracking crash on Play Store

This commit is contained in:
Eric House 2021-05-17 12:49:39 -07:00
parent 8f5484c5a6
commit 3fd6303f9e
2 changed files with 4 additions and 0 deletions

View file

@ -2204,6 +2204,7 @@ public class BoardDelegate extends DelegateBase
private Handler makeJNIHandler()
{
Handler handler = new Handler() {
@Override
public void handleMessage( final Message msg ) {
switch( msg.what ) {
case JNIThread.DIALOG:
@ -2231,6 +2232,7 @@ public class BoardDelegate extends DelegateBase
runOnUiThread( new Runnable() {
@Override
public void run() {
Assert.assertTrue( m_jniGamePtr.isRetained() );
boolean hasPending = 0 < XwJNI.
comms_countPendingPackets( m_jniGamePtr );
mGameOverAlert = GameOverAlert

View file

@ -69,6 +69,8 @@ public class XwJNI {
public long getRowid() { return m_rowid; }
public boolean isRetained() { return 0 < m_refCount; }
// Force (via an assert in finalize() below) that this is called. It's
// better if jni stuff isn't being done on the finalizer thread
public synchronized void release()