enable relayid-invites for non-tagged release builds

Too useful for testing
This commit is contained in:
Eric House 2020-04-11 19:54:02 -07:00
parent 29ed46e12b
commit 9fd4bb2a11
3 changed files with 10 additions and 13 deletions

View file

@ -96,7 +96,6 @@ android {
resValue "string", "app_name", "CrossWords"
resValue "string", "nbs_port", "3344"
buildConfigField "boolean", "WIDIR_ENABLED", "false"
buildConfigField "boolean", "RELAYINVITE_SUPPORTED", "false"
buildConfigField "String", "VARIANT_NAME", "\"Google Play Store\""
buildConfigField "int", "VARIANT_CODE", "1"
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\""
@ -112,7 +111,6 @@ android {
resValue "string", "app_name", "CrossWords"
resValue "string", "nbs_port", "3344"
buildConfigField "boolean", "WIDIR_ENABLED", "false"
buildConfigField "boolean", "RELAYINVITE_SUPPORTED", "false"
buildConfigField "String", "VARIANT_NAME", "\"F-Droid\""
buildConfigField "int", "VARIANT_CODE", "2"
buildConfigField "boolean", "FOR_FDROID", "true"
@ -129,7 +127,6 @@ android {
resValue "string", "app_name", "CrossDbg"
resValue "string", "nbs_port", "3345"
buildConfigField "boolean", "WIDIR_ENABLED", "true"
buildConfigField "boolean", "RELAYINVITE_SUPPORTED", "true"
buildConfigField "String", "VARIANT_NAME", "\"Dev/Debug\""
buildConfigField "int", "VARIANT_CODE", "3"
buildConfigField "boolean", "REPORT_LOCKS", "true"
@ -148,7 +145,6 @@ android {
resValue "string", "app_name", "CrossDbg"
resValue "string", "nbs_port", "3345"
buildConfigField "boolean", "WIDIR_ENABLED", "true"
buildConfigField "boolean", "RELAYINVITE_SUPPORTED", "true"
buildConfigField "String", "VARIANT_NAME", "\"Dev/Debug NoSMS\""
buildConfigField "int", "VARIANT_CODE", "4"
buildConfigField "boolean", "REPORT_LOCKS", "true"
@ -165,7 +161,6 @@ android {
resValue "string", "app_name", "CrossWords"
resValue "string", "nbs_port", "3344"
buildConfigField "boolean", "WIDIR_ENABLED", "false"
buildConfigField "boolean", "RELAYINVITE_SUPPORTED", "false"
buildConfigField "String", "VARIANT_NAME", "\"FOSS\""
buildConfigField "int", "VARIANT_CODE", "5"
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\""

View file

@ -65,7 +65,7 @@ public class InviteChoicesAlert extends DlgDelegateAlert {
if ( Utils.deviceSupportsNBS(context) ) {
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 );
}
if ( WiDirWrapper.enabled() ) {

View file

@ -57,6 +57,8 @@ import org.eehouse.android.xw4.DlgDelegate.Action;
public class RelayInviteDelegate extends InviteDelegate {
private static final String TAG = RelayInviteDelegate.class.getSimpleName();
private static final String RECS_KEY = "TAG" + "/recs";
private static final boolean RELAYINVITE_SUPPORTED
= BuildConfig.DEBUG || !BuildConfig.IS_TAGGED_BUILD;
private static int[] BUTTONIDS = {
R.id.button_relay_add,
@ -77,7 +79,7 @@ public class RelayInviteDelegate extends InviteDelegate {
SentInvitesInfo info,
RequestCode requestCode )
{
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
if ( RELAYINVITE_SUPPORTED ) {
Intent intent =
InviteDelegate.makeIntent( activity, RelayInviteActivity.class,
nMissing, info );
@ -94,7 +96,7 @@ public class RelayInviteDelegate extends InviteDelegate {
@Override
protected void init( Bundle savedInstanceState )
{
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
if ( RELAYINVITE_SUPPORTED ) {
super.init( savedInstanceState );
String msg = getString( R.string.button_invite );
@ -137,7 +139,7 @@ public class RelayInviteDelegate extends InviteDelegate {
@Override
protected void onBarButtonClicked( int id )
{
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
if ( RELAYINVITE_SUPPORTED ) {
switch( id ) {
case R.id.button_relay_add:
Utils.notImpl( m_activity );
@ -189,7 +191,7 @@ public class RelayInviteDelegate extends InviteDelegate {
protected Dialog makeDialog( DBAlert alert, Object[] params )
{
Dialog dialog = null;
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
if ( RELAYINVITE_SUPPORTED ) {
DialogInterface.OnClickListener lstnr;
switch( alert.getDlgID() ) {
case GET_NUMBER: {
@ -334,7 +336,7 @@ public class RelayInviteDelegate extends InviteDelegate {
@Override
protected void tryEnable()
{
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
if ( RELAYINVITE_SUPPORTED ) {
super.tryEnable();
Button button = (Button)findViewById( R.id.button_clear );
@ -353,7 +355,7 @@ public class RelayInviteDelegate extends InviteDelegate {
public boolean onPosButton( Action action, Object[] params )
{
boolean handled = true;
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
if ( RELAYINVITE_SUPPORTED ) {
switch( action ) {
case CLEAR_ACTION:
clearSelectedImpl();
@ -373,7 +375,7 @@ public class RelayInviteDelegate extends InviteDelegate {
public boolean onDismissed( Action action, Object[] params )
{
boolean handled = true;
if ( BuildConfig.RELAYINVITE_SUPPORTED ) {
if ( RELAYINVITE_SUPPORTED ) {
if ( Action.USE_IMMOBILE_ACTION == action && m_immobileConfirmed ) {
makeConfirmThenBuilder( R.string.warn_unlimited,
Action.POST_WARNING_ACTION )