fix NPE. Method isn't called unless positive/confirming button has

been pressed.
This commit is contained in:
Eric House 2016-03-19 05:44:37 -07:00
parent ab26e263ef
commit b6f992533a

View file

@ -238,11 +238,8 @@ public class PrefsDelegate extends DelegateBase
{ {
if ( AlertDialog.BUTTON_POSITIVE == button if ( AlertDialog.BUTTON_POSITIVE == button
&& action == Action.ENABLE_SMS_DO ) { && action == Action.ENABLE_SMS_DO ) {
boolean enabled = (Boolean)params[0]; XWPrefs.setSMSEnabled( m_activity, true );
if ( enabled ) { SMSCheckBoxPreference.setChecked();
XWPrefs.setSMSEnabled( m_activity, true );
SMSCheckBoxPreference.setChecked();
}
} else { } else {
super.dlgButtonClicked( action, button, params ); super.dlgButtonClicked( action, button, params );
} }