From b6f992533a54389fd770321115ddc9c963d5f2eb Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 19 Mar 2016 05:44:37 -0700 Subject: [PATCH] fix NPE. Method isn't called unless positive/confirming button has been pressed. --- .../XWords4/src/org/eehouse/android/xw4/PrefsDelegate.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/PrefsDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/PrefsDelegate.java index fa830dde6..3a09e1cc6 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/PrefsDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/PrefsDelegate.java @@ -238,11 +238,8 @@ public class PrefsDelegate extends DelegateBase { if ( AlertDialog.BUTTON_POSITIVE == button && action == Action.ENABLE_SMS_DO ) { - boolean enabled = (Boolean)params[0]; - if ( enabled ) { - XWPrefs.setSMSEnabled( m_activity, true ); - SMSCheckBoxPreference.setChecked(); - } + XWPrefs.setSMSEnabled( m_activity, true ); + SMSCheckBoxPreference.setChecked(); } else { super.dlgButtonClicked( action, button, params ); }