mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
fix mystery crash on my phone
but not on emulator running same OS version (or close). And in spite of an exception being thrown the work being done, hiding a preference, still succeeds. Whatever.
This commit is contained in:
parent
fac8c2b943
commit
8c680b50f7
1 changed files with 10 additions and 4 deletions
|
@ -321,10 +321,16 @@ public class PrefsDelegate extends DelegateBase
|
|||
|
||||
private void hideOne( int prefID, int screenID )
|
||||
{
|
||||
Preference pref = m_activity.findPreference( getString( prefID ) );
|
||||
String key = getString( screenID );
|
||||
((PreferenceScreen)m_activity.findPreference( key ))
|
||||
.removePreference( pref );
|
||||
try {
|
||||
Preference pref = m_activity.findPreference( getString( prefID ) );
|
||||
String key = getString( screenID );
|
||||
((PreferenceScreen)m_activity.findPreference( key ))
|
||||
.removePreference( pref );
|
||||
} catch ( NullPointerException ex ) {
|
||||
// This is happening hiding key_enable_sms, but the hide still
|
||||
// works!
|
||||
// DbgUtils.logex( TAG, ex );
|
||||
}
|
||||
}
|
||||
|
||||
private void hideStuff()
|
||||
|
|
Loading…
Reference in a new issue