From 8974407a6779ee4cff4a33b4dc2a54be42015264 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 25 Nov 2014 07:17:03 -0800 Subject: [PATCH] setTitle: it's either networked or not --- .../android/xw4/GameConfigDelegate.java | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfigDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfigDelegate.java index 0050a89ed..11471edee 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfigDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameConfigDelegate.java @@ -1148,26 +1148,14 @@ public class GameConfigDelegate extends DelegateBase private void setTitle() { - int strID = 0; - for ( Iterator iter = m_conTypes.iterator(); - 0 == strID && iter.hasNext(); ) { - switch( iter.next() ) { - case COMMS_CONN_RELAY: - strID = R.string.title_gamenet_config_fmt; - break; - case COMMS_CONN_BT: - strID = R.string.title_gamebt_config_fmt; - break; - default: - break; - } - } - - if ( 0 == strID ) { + int strID; + if ( null != m_conTypes && 0 < m_conTypes.size() ) { + strID = R.string.title_gamenet_config_fmt; + } else { strID = R.string.title_game_config_fmt; } - - setTitle( getString( strID, GameUtils.getName( m_activity, m_rowid ) ) ); + String name = GameUtils.getName( m_activity, m_rowid ); + setTitle( getString( strID, name ) ); } private boolean localOnlyGame()