From e60a16be1e387e257ea743c9999e5fbd9939e487 Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 26 Jun 2015 06:13:11 -0700 Subject: [PATCH] add onPrepareDialog, without which we crash turning on SMS from prefs. Note: I've committed this before and somehow lost it, so there may be some git anomolies here. --- .../eehouse/android/xw4/PrefsActivity.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/PrefsActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/PrefsActivity.java index 392cfdb79..0d05e129e 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/PrefsActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/PrefsActivity.java @@ -34,12 +34,6 @@ public class PrefsActivity extends PreferenceActivity private PrefsDelegate m_dlgt; - @Override - protected Dialog onCreateDialog( int id ) - { - return m_dlgt.onCreateDialog( id ); - } - @Override protected void onCreate( Bundle savedInstanceState ) { @@ -89,6 +83,19 @@ public class PrefsActivity extends PreferenceActivity super.onDestroy(); } + @Override + protected Dialog onCreateDialog( int id ) + { + return m_dlgt.onCreateDialog( id ); + } + + @Override + public void onPrepareDialog( int id, Dialog dialog ) + { + super.onPrepareDialog( id, dialog ); + m_dlgt.prepareDialog( DlgID.values()[id], dialog ); + } + public void showOKOnlyDialog( int msgID ) { m_dlgt.showOKOnlyDialog( msgID );