mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +01:00
enable relayid-invites for non-tagged release builds
Too useful for testing
This commit is contained in:
parent
29ed46e12b
commit
9fd4bb2a11
3 changed files with 10 additions and 13 deletions
|
@ -96,7 +96,6 @@ android {
|
||||||
resValue "string", "app_name", "CrossWords"
|
resValue "string", "app_name", "CrossWords"
|
||||||
resValue "string", "nbs_port", "3344"
|
resValue "string", "nbs_port", "3344"
|
||||||
buildConfigField "boolean", "WIDIR_ENABLED", "false"
|
buildConfigField "boolean", "WIDIR_ENABLED", "false"
|
||||||
buildConfigField "boolean", "RELAYINVITE_SUPPORTED", "false"
|
|
||||||
buildConfigField "String", "VARIANT_NAME", "\"Google Play Store\""
|
buildConfigField "String", "VARIANT_NAME", "\"Google Play Store\""
|
||||||
buildConfigField "int", "VARIANT_CODE", "1"
|
buildConfigField "int", "VARIANT_CODE", "1"
|
||||||
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\""
|
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\""
|
||||||
|
@ -112,7 +111,6 @@ android {
|
||||||
resValue "string", "app_name", "CrossWords"
|
resValue "string", "app_name", "CrossWords"
|
||||||
resValue "string", "nbs_port", "3344"
|
resValue "string", "nbs_port", "3344"
|
||||||
buildConfigField "boolean", "WIDIR_ENABLED", "false"
|
buildConfigField "boolean", "WIDIR_ENABLED", "false"
|
||||||
buildConfigField "boolean", "RELAYINVITE_SUPPORTED", "false"
|
|
||||||
buildConfigField "String", "VARIANT_NAME", "\"F-Droid\""
|
buildConfigField "String", "VARIANT_NAME", "\"F-Droid\""
|
||||||
buildConfigField "int", "VARIANT_CODE", "2"
|
buildConfigField "int", "VARIANT_CODE", "2"
|
||||||
buildConfigField "boolean", "FOR_FDROID", "true"
|
buildConfigField "boolean", "FOR_FDROID", "true"
|
||||||
|
@ -129,7 +127,6 @@ android {
|
||||||
resValue "string", "app_name", "CrossDbg"
|
resValue "string", "app_name", "CrossDbg"
|
||||||
resValue "string", "nbs_port", "3345"
|
resValue "string", "nbs_port", "3345"
|
||||||
buildConfigField "boolean", "WIDIR_ENABLED", "true"
|
buildConfigField "boolean", "WIDIR_ENABLED", "true"
|
||||||
buildConfigField "boolean", "RELAYINVITE_SUPPORTED", "true"
|
|
||||||
buildConfigField "String", "VARIANT_NAME", "\"Dev/Debug\""
|
buildConfigField "String", "VARIANT_NAME", "\"Dev/Debug\""
|
||||||
buildConfigField "int", "VARIANT_CODE", "3"
|
buildConfigField "int", "VARIANT_CODE", "3"
|
||||||
buildConfigField "boolean", "REPORT_LOCKS", "true"
|
buildConfigField "boolean", "REPORT_LOCKS", "true"
|
||||||
|
@ -148,7 +145,6 @@ android {
|
||||||
resValue "string", "app_name", "CrossDbg"
|
resValue "string", "app_name", "CrossDbg"
|
||||||
resValue "string", "nbs_port", "3345"
|
resValue "string", "nbs_port", "3345"
|
||||||
buildConfigField "boolean", "WIDIR_ENABLED", "true"
|
buildConfigField "boolean", "WIDIR_ENABLED", "true"
|
||||||
buildConfigField "boolean", "RELAYINVITE_SUPPORTED", "true"
|
|
||||||
buildConfigField "String", "VARIANT_NAME", "\"Dev/Debug NoSMS\""
|
buildConfigField "String", "VARIANT_NAME", "\"Dev/Debug NoSMS\""
|
||||||
buildConfigField "int", "VARIANT_CODE", "4"
|
buildConfigField "int", "VARIANT_CODE", "4"
|
||||||
buildConfigField "boolean", "REPORT_LOCKS", "true"
|
buildConfigField "boolean", "REPORT_LOCKS", "true"
|
||||||
|
@ -165,7 +161,6 @@ android {
|
||||||
resValue "string", "app_name", "CrossWords"
|
resValue "string", "app_name", "CrossWords"
|
||||||
resValue "string", "nbs_port", "3344"
|
resValue "string", "nbs_port", "3344"
|
||||||
buildConfigField "boolean", "WIDIR_ENABLED", "false"
|
buildConfigField "boolean", "WIDIR_ENABLED", "false"
|
||||||
buildConfigField "boolean", "RELAYINVITE_SUPPORTED", "false"
|
|
||||||
buildConfigField "String", "VARIANT_NAME", "\"FOSS\""
|
buildConfigField "String", "VARIANT_NAME", "\"FOSS\""
|
||||||
buildConfigField "int", "VARIANT_CODE", "5"
|
buildConfigField "int", "VARIANT_CODE", "5"
|
||||||
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\""
|
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\""
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class InviteChoicesAlert extends DlgDelegateAlert {
|
||||||
if ( Utils.deviceSupportsNBS(context) ) {
|
if ( Utils.deviceSupportsNBS(context) ) {
|
||||||
add( items, means, R.string.invite_choice_data_sms, InviteMeans.SMS_DATA );
|
add( items, means, R.string.invite_choice_data_sms, InviteMeans.SMS_DATA );
|
||||||
}
|
}
|
||||||
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
|
if ( BuildConfig.DEBUG || !BuildConfig.IS_TAGGED_BUILD ) {
|
||||||
add( items, means, R.string.invite_choice_relay, InviteMeans.RELAY );
|
add( items, means, R.string.invite_choice_relay, InviteMeans.RELAY );
|
||||||
}
|
}
|
||||||
if ( WiDirWrapper.enabled() ) {
|
if ( WiDirWrapper.enabled() ) {
|
||||||
|
|
|
@ -57,6 +57,8 @@ import org.eehouse.android.xw4.DlgDelegate.Action;
|
||||||
public class RelayInviteDelegate extends InviteDelegate {
|
public class RelayInviteDelegate extends InviteDelegate {
|
||||||
private static final String TAG = RelayInviteDelegate.class.getSimpleName();
|
private static final String TAG = RelayInviteDelegate.class.getSimpleName();
|
||||||
private static final String RECS_KEY = "TAG" + "/recs";
|
private static final String RECS_KEY = "TAG" + "/recs";
|
||||||
|
private static final boolean RELAYINVITE_SUPPORTED
|
||||||
|
= BuildConfig.DEBUG || !BuildConfig.IS_TAGGED_BUILD;
|
||||||
|
|
||||||
private static int[] BUTTONIDS = {
|
private static int[] BUTTONIDS = {
|
||||||
R.id.button_relay_add,
|
R.id.button_relay_add,
|
||||||
|
@ -77,7 +79,7 @@ public class RelayInviteDelegate extends InviteDelegate {
|
||||||
SentInvitesInfo info,
|
SentInvitesInfo info,
|
||||||
RequestCode requestCode )
|
RequestCode requestCode )
|
||||||
{
|
{
|
||||||
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
|
if ( RELAYINVITE_SUPPORTED ) {
|
||||||
Intent intent =
|
Intent intent =
|
||||||
InviteDelegate.makeIntent( activity, RelayInviteActivity.class,
|
InviteDelegate.makeIntent( activity, RelayInviteActivity.class,
|
||||||
nMissing, info );
|
nMissing, info );
|
||||||
|
@ -94,7 +96,7 @@ public class RelayInviteDelegate extends InviteDelegate {
|
||||||
@Override
|
@Override
|
||||||
protected void init( Bundle savedInstanceState )
|
protected void init( Bundle savedInstanceState )
|
||||||
{
|
{
|
||||||
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
|
if ( RELAYINVITE_SUPPORTED ) {
|
||||||
super.init( savedInstanceState );
|
super.init( savedInstanceState );
|
||||||
|
|
||||||
String msg = getString( R.string.button_invite );
|
String msg = getString( R.string.button_invite );
|
||||||
|
@ -137,7 +139,7 @@ public class RelayInviteDelegate extends InviteDelegate {
|
||||||
@Override
|
@Override
|
||||||
protected void onBarButtonClicked( int id )
|
protected void onBarButtonClicked( int id )
|
||||||
{
|
{
|
||||||
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
|
if ( RELAYINVITE_SUPPORTED ) {
|
||||||
switch( id ) {
|
switch( id ) {
|
||||||
case R.id.button_relay_add:
|
case R.id.button_relay_add:
|
||||||
Utils.notImpl( m_activity );
|
Utils.notImpl( m_activity );
|
||||||
|
@ -189,7 +191,7 @@ public class RelayInviteDelegate extends InviteDelegate {
|
||||||
protected Dialog makeDialog( DBAlert alert, Object[] params )
|
protected Dialog makeDialog( DBAlert alert, Object[] params )
|
||||||
{
|
{
|
||||||
Dialog dialog = null;
|
Dialog dialog = null;
|
||||||
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
|
if ( RELAYINVITE_SUPPORTED ) {
|
||||||
DialogInterface.OnClickListener lstnr;
|
DialogInterface.OnClickListener lstnr;
|
||||||
switch( alert.getDlgID() ) {
|
switch( alert.getDlgID() ) {
|
||||||
case GET_NUMBER: {
|
case GET_NUMBER: {
|
||||||
|
@ -334,7 +336,7 @@ public class RelayInviteDelegate extends InviteDelegate {
|
||||||
@Override
|
@Override
|
||||||
protected void tryEnable()
|
protected void tryEnable()
|
||||||
{
|
{
|
||||||
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
|
if ( RELAYINVITE_SUPPORTED ) {
|
||||||
super.tryEnable();
|
super.tryEnable();
|
||||||
|
|
||||||
Button button = (Button)findViewById( R.id.button_clear );
|
Button button = (Button)findViewById( R.id.button_clear );
|
||||||
|
@ -353,7 +355,7 @@ public class RelayInviteDelegate extends InviteDelegate {
|
||||||
public boolean onPosButton( Action action, Object[] params )
|
public boolean onPosButton( Action action, Object[] params )
|
||||||
{
|
{
|
||||||
boolean handled = true;
|
boolean handled = true;
|
||||||
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
|
if ( RELAYINVITE_SUPPORTED ) {
|
||||||
switch( action ) {
|
switch( action ) {
|
||||||
case CLEAR_ACTION:
|
case CLEAR_ACTION:
|
||||||
clearSelectedImpl();
|
clearSelectedImpl();
|
||||||
|
@ -373,7 +375,7 @@ public class RelayInviteDelegate extends InviteDelegate {
|
||||||
public boolean onDismissed( Action action, Object[] params )
|
public boolean onDismissed( Action action, Object[] params )
|
||||||
{
|
{
|
||||||
boolean handled = true;
|
boolean handled = true;
|
||||||
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
|
if ( RELAYINVITE_SUPPORTED ) {
|
||||||
if ( Action.USE_IMMOBILE_ACTION == action && m_immobileConfirmed ) {
|
if ( Action.USE_IMMOBILE_ACTION == action && m_immobileConfirmed ) {
|
||||||
makeConfirmThenBuilder( R.string.warn_unlimited,
|
makeConfirmThenBuilder( R.string.warn_unlimited,
|
||||||
Action.POST_WARNING_ACTION )
|
Action.POST_WARNING_ACTION )
|
||||||
|
|
Loading…
Reference in a new issue