mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-22 07:28:16 +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>
|
||||
<li>Made new CollegeEngFull wordlist available for download in
|
||||
case you miss those 54 words</li>
|
||||
<li>Addressed crash reported through Google (thanks!)</li>
|
||||
</ul>
|
||||
|
||||
<p>(The full changelog
|
||||
|
|
|
@ -529,9 +529,7 @@ public class BoardDelegate extends DelegateBase
|
|||
dialog = ab.create();
|
||||
|
||||
// Hack: I can't prevent screen rotation from duplicating this alert
|
||||
if ( null != m_inviteAlert ) {
|
||||
m_inviteAlert.dismiss();
|
||||
}
|
||||
dismissInviteAlert();
|
||||
m_inviteAlert = alert;
|
||||
alert.setOnCancelListener( new DBAlert.OnCancelListener() {
|
||||
@Override
|
||||
|
@ -2206,14 +2204,28 @@ public class BoardDelegate extends DelegateBase
|
|||
}
|
||||
if ( 0 == nMissing || !m_relayMissing ) {
|
||||
Log.d( TAG, "dismissing invite alert %H", m_inviteAlert );
|
||||
if ( null != m_inviteAlert ) {
|
||||
m_inviteAlert.dismiss();
|
||||
}
|
||||
dismissInviteAlert();
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
if ( null != m_connTypes
|
||||
|
@ -2786,10 +2798,7 @@ public class BoardDelegate extends DelegateBase
|
|||
DBUtils.recordInviteSent( m_activity, m_rowid, means, dev );
|
||||
|
||||
if ( !invitesSent ) {
|
||||
if ( null != m_inviteAlert ) {
|
||||
m_inviteAlert.dismiss();
|
||||
m_inviteAlert = null;
|
||||
}
|
||||
dismissInviteAlert();
|
||||
Log.d( TAG, "recordInviteSent(): redoing invite alert" );
|
||||
showInviteAlertIf();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue