mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
fix crash starting three-device games
This commit is contained in:
parent
b999da1a92
commit
e59161ae2d
3 changed files with 8 additions and 3 deletions
|
@ -98,6 +98,8 @@ public class InviteChoicesAlert extends DlgDelegateAlert
|
||||||
nInvited = (Integer)params[2];
|
nInvited = (Integer)params[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Log.d( TAG, "populateBuilder(): nMissing=%d, nInvited=%d",
|
||||||
|
nMissing, nInvited );
|
||||||
means.add( InviteMeans.EMAIL );
|
means.add( InviteMeans.EMAIL );
|
||||||
means.add( InviteMeans.SMS_USER );
|
means.add( InviteMeans.SMS_USER );
|
||||||
|
|
||||||
|
@ -164,7 +166,8 @@ public class InviteChoicesAlert extends DlgDelegateAlert
|
||||||
;
|
;
|
||||||
|
|
||||||
String[] players = XwJNI.kplr_getPlayers();
|
String[] players = XwJNI.kplr_getPlayers();
|
||||||
mInviteView.setChoices( means, lastSelMeans, players, nMissing, nInvited )
|
mInviteView.setChoices( means, lastSelMeans, players, nMissing,
|
||||||
|
nInvited )
|
||||||
.setNli( nli )
|
.setNli( nli )
|
||||||
.setCallbacks( this )
|
.setCallbacks( this )
|
||||||
;
|
;
|
||||||
|
|
|
@ -75,9 +75,10 @@ public class InviteView extends ScrollView
|
||||||
}
|
}
|
||||||
|
|
||||||
public InviteView setChoices( List<InviteMeans> meansList, int sel,
|
public InviteView setChoices( List<InviteMeans> meansList, int sel,
|
||||||
String[] players, int maxPlayers,
|
String[] players, int nMissing,
|
||||||
int nInvited )
|
int nInvited )
|
||||||
{
|
{
|
||||||
|
Log.d( TAG, "setChoices(nInvited=%d, nMissing=%s)", nInvited, nMissing );
|
||||||
final Context context = getContext();
|
final Context context = getContext();
|
||||||
|
|
||||||
boolean haveWho = null != players && 0 < players.length;
|
boolean haveWho = null != players && 0 < players.length;
|
||||||
|
@ -111,7 +112,7 @@ public class InviteView extends ScrollView
|
||||||
|
|
||||||
if ( haveWho ) {
|
if ( haveWho ) {
|
||||||
mGroupWho = ((LimSelGroup)findViewById( R.id.group_who ))
|
mGroupWho = ((LimSelGroup)findViewById( R.id.group_who ))
|
||||||
.setLimit( maxPlayers - nInvited )
|
.setLimit( nMissing )
|
||||||
.addPlayers( players )
|
.addPlayers( players )
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ public class LimSelGroup extends LinearLayout
|
||||||
|
|
||||||
LimSelGroup setLimit( int limit )
|
LimSelGroup setLimit( int limit )
|
||||||
{
|
{
|
||||||
|
Log.d( TAG, "setLimit(limit=%d)", limit );
|
||||||
Assert.assertTrueNR( 0 < limit );
|
Assert.assertTrueNR( 0 < limit );
|
||||||
mLimit = limit;
|
mLimit = limit;
|
||||||
return this;
|
return this;
|
||||||
|
|
Loading…
Reference in a new issue