mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-08 20:46:12 +01:00
catch NPE Play console reports thrown by OS
No clue why this might be happening, but perhaps catching and dropping will prevent a bad user experience?
This commit is contained in:
parent
c3bfbfb956
commit
055f54611d
2 changed files with 20 additions and 10 deletions
|
@ -32,6 +32,7 @@
|
||||||
guess, "Top4997" instead)</li>
|
guess, "Top4997" instead)</li>
|
||||||
<li>Made new CollegeEngFull wordlist available for download in
|
<li>Made new CollegeEngFull wordlist available for download in
|
||||||
case you miss those 54 words</li>
|
case you miss those 54 words</li>
|
||||||
|
<li>Addressed crash reported through Google (thanks!)</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>(The full changelog
|
<p>(The full changelog
|
||||||
|
|
|
@ -529,9 +529,7 @@ public class BoardDelegate extends DelegateBase
|
||||||
dialog = ab.create();
|
dialog = ab.create();
|
||||||
|
|
||||||
// Hack: I can't prevent screen rotation from duplicating this alert
|
// Hack: I can't prevent screen rotation from duplicating this alert
|
||||||
if ( null != m_inviteAlert ) {
|
dismissInviteAlert();
|
||||||
m_inviteAlert.dismiss();
|
|
||||||
}
|
|
||||||
m_inviteAlert = alert;
|
m_inviteAlert = alert;
|
||||||
alert.setOnCancelListener( new DBAlert.OnCancelListener() {
|
alert.setOnCancelListener( new DBAlert.OnCancelListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -2206,14 +2204,28 @@ public class BoardDelegate extends DelegateBase
|
||||||
}
|
}
|
||||||
if ( 0 == nMissing || !m_relayMissing ) {
|
if ( 0 == nMissing || !m_relayMissing ) {
|
||||||
Log.d( TAG, "dismissing invite alert %H", m_inviteAlert );
|
Log.d( TAG, "dismissing invite alert %H", m_inviteAlert );
|
||||||
if ( null != m_inviteAlert ) {
|
dismissInviteAlert();
|
||||||
m_inviteAlert.dismiss();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void dismissInviteAlert()
|
||||||
|
{
|
||||||
|
if ( null != m_inviteAlert ) {
|
||||||
|
// Play Console reports a crash inside DialogFragment.dismiss()
|
||||||
|
// resulting from getFragmentManager() returning null. That
|
||||||
|
// probably means I'm on the way out and can safely drop? Let's
|
||||||
|
// see....
|
||||||
|
try {
|
||||||
|
m_inviteAlert.dismiss();
|
||||||
|
} catch ( NullPointerException npe ) {
|
||||||
|
Assert.assertFalse( BuildConfig.DEBUG );
|
||||||
|
}
|
||||||
|
m_inviteAlert = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void pingBTRemotes()
|
private void pingBTRemotes()
|
||||||
{
|
{
|
||||||
if ( null != m_connTypes
|
if ( null != m_connTypes
|
||||||
|
@ -2786,10 +2798,7 @@ public class BoardDelegate extends DelegateBase
|
||||||
DBUtils.recordInviteSent( m_activity, m_rowid, means, dev );
|
DBUtils.recordInviteSent( m_activity, m_rowid, means, dev );
|
||||||
|
|
||||||
if ( !invitesSent ) {
|
if ( !invitesSent ) {
|
||||||
if ( null != m_inviteAlert ) {
|
dismissInviteAlert();
|
||||||
m_inviteAlert.dismiss();
|
|
||||||
m_inviteAlert = null;
|
|
||||||
}
|
|
||||||
Log.d( TAG, "recordInviteSent(): redoing invite alert" );
|
Log.d( TAG, "recordInviteSent(): redoing invite alert" );
|
||||||
showInviteAlertIf();
|
showInviteAlertIf();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue