mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-02 20:46:15 +01:00
always respect user's local player name
This commit is contained in:
parent
eb79393dc1
commit
e799474e00
2 changed files with 7 additions and 3 deletions
|
@ -27,11 +27,14 @@ import android.os.Build;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
|
||||||
import org.eehouse.android.xw4.DictUtils;
|
import org.eehouse.android.xw4.DictUtils;
|
||||||
|
import org.eehouse.android.xw4.Log;
|
||||||
import org.eehouse.android.xw4.R;
|
import org.eehouse.android.xw4.R;
|
||||||
import org.eehouse.android.xw4.XWPrefs;
|
import org.eehouse.android.xw4.XWPrefs;
|
||||||
import org.eehouse.android.xw4.loc.LocUtils;
|
import org.eehouse.android.xw4.loc.LocUtils;
|
||||||
|
|
||||||
public class CommonPrefs extends XWPrefs {
|
public class CommonPrefs extends XWPrefs {
|
||||||
|
private static final String TAG = CommonPrefs.class.getSimpleName();
|
||||||
|
|
||||||
public static final int COLOR_TILE_BACK = 0;
|
public static final int COLOR_TILE_BACK = 0;
|
||||||
public static final int COLOR_NOTILE = 1;
|
public static final int COLOR_NOTILE = 1;
|
||||||
public static final int COLOR_FOCUS = 2;
|
public static final int COLOR_FOCUS = 2;
|
||||||
|
|
|
@ -22,15 +22,16 @@ package org.eehouse.android.xw4.jni;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.eehouse.android.xw4.Assert;
|
import org.eehouse.android.xw4.Assert;
|
||||||
import org.eehouse.android.xw4.BuildConfig;
|
import org.eehouse.android.xw4.BuildConfig;
|
||||||
|
import org.eehouse.android.xw4.Log;
|
||||||
import org.eehouse.android.xw4.R;
|
import org.eehouse.android.xw4.R;
|
||||||
import org.eehouse.android.xw4.Utils;
|
import org.eehouse.android.xw4.Utils;
|
||||||
|
|
||||||
public class LocalPlayer implements Serializable {
|
public class LocalPlayer implements Serializable {
|
||||||
|
private static final String TAG = LocalPlayer.class.getSimpleName();
|
||||||
public String name;
|
public String name;
|
||||||
public String password;
|
public String password;
|
||||||
public String dictName;
|
public String dictName;
|
||||||
|
@ -42,8 +43,8 @@ public class LocalPlayer implements Serializable {
|
||||||
{
|
{
|
||||||
isLocal = true;
|
isLocal = true;
|
||||||
robotIQ = 0; // human
|
robotIQ = 0; // human
|
||||||
String fmt = context.getString( R.string.player_fmt);
|
name = CommonPrefs.getDefaultPlayerName( context, num, true );
|
||||||
name = String.format( fmt, num + 1 );
|
Log.d( TAG, "__init(%d) => %s", num, name );
|
||||||
password = "";
|
password = "";
|
||||||
|
|
||||||
// Utils.testSerialization( this );
|
// Utils.testSerialization( this );
|
||||||
|
|
Loading…
Add table
Reference in a new issue