mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-13 08:01:33 +01:00
for style points, don't return from middle of function. No behavior
change.
This commit is contained in:
parent
5d01de4c0c
commit
20446bcf32
1 changed files with 12 additions and 7 deletions
|
@ -27,7 +27,6 @@ import android.graphics.Paint;
|
|||
import android.content.res.Resources;
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.eehouse.android.xw4.Utils;
|
||||
import org.eehouse.android.xw4.R;
|
||||
import org.eehouse.android.xw4.DictUtils;
|
||||
|
||||
|
@ -183,31 +182,37 @@ public class CommonPrefs {
|
|||
public static int getDefaultBoardSize( Context context )
|
||||
{
|
||||
String value = getString( context, R.string.key_board_size );
|
||||
int result;
|
||||
try {
|
||||
return Integer.parseInt( value.substring( 0, 2 ) );
|
||||
result = Integer.parseInt( value.substring( 0, 2 ) );
|
||||
} catch ( Exception ex ) {
|
||||
return 15;
|
||||
result = 15;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static int getDefaultPlayerMinutes( Context context )
|
||||
{
|
||||
String value = getString( context, R.string.key_initial_player_minutes );
|
||||
int result;
|
||||
try {
|
||||
return Integer.parseInt( value );
|
||||
result = Integer.parseInt( value );
|
||||
} catch ( Exception ex ) {
|
||||
return 25;
|
||||
result = 25;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static long getProxyInterval( Context context )
|
||||
{
|
||||
String value = getString( context, R.string.key_connect_frequency );
|
||||
long result;
|
||||
try {
|
||||
return Long.parseLong( value );
|
||||
result = Long.parseLong( value );
|
||||
} catch ( Exception ex ) {
|
||||
return -1;
|
||||
result = -1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String getDefaultHumanDict( Context context )
|
||||
|
|
Loading…
Reference in a new issue