mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
add assert toward tracking crash on Play Store
This commit is contained in:
parent
8f5484c5a6
commit
3fd6303f9e
2 changed files with 4 additions and 0 deletions
|
@ -2204,6 +2204,7 @@ public class BoardDelegate extends DelegateBase
|
||||||
private Handler makeJNIHandler()
|
private Handler makeJNIHandler()
|
||||||
{
|
{
|
||||||
Handler handler = new Handler() {
|
Handler handler = new Handler() {
|
||||||
|
@Override
|
||||||
public void handleMessage( final Message msg ) {
|
public void handleMessage( final Message msg ) {
|
||||||
switch( msg.what ) {
|
switch( msg.what ) {
|
||||||
case JNIThread.DIALOG:
|
case JNIThread.DIALOG:
|
||||||
|
@ -2231,6 +2232,7 @@ public class BoardDelegate extends DelegateBase
|
||||||
runOnUiThread( new Runnable() {
|
runOnUiThread( new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
Assert.assertTrue( m_jniGamePtr.isRetained() );
|
||||||
boolean hasPending = 0 < XwJNI.
|
boolean hasPending = 0 < XwJNI.
|
||||||
comms_countPendingPackets( m_jniGamePtr );
|
comms_countPendingPackets( m_jniGamePtr );
|
||||||
mGameOverAlert = GameOverAlert
|
mGameOverAlert = GameOverAlert
|
||||||
|
|
|
@ -69,6 +69,8 @@ public class XwJNI {
|
||||||
|
|
||||||
public long getRowid() { return m_rowid; }
|
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
|
// 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
|
// better if jni stuff isn't being done on the finalizer thread
|
||||||
public synchronized void release()
|
public synchronized void release()
|
||||||
|
|
Loading…
Add table
Reference in a new issue