mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-22 07:28:16 +01:00
hide mqtt but couple it to relay
Idea is that if you have relay you have MQTT too. Eventually relay should go away.
This commit is contained in:
parent
28ff1022c3
commit
4508192a3a
3 changed files with 18 additions and 7 deletions
|
@ -101,9 +101,9 @@ public class ConnViaViewLayout extends LinearLayout {
|
||||||
if ( isChecked ) {
|
if ( isChecked ) {
|
||||||
showNotAgainTypeTip( typf );
|
showNotAgainTypeTip( typf );
|
||||||
enabledElseWarn( typf );
|
enabledElseWarn( typf );
|
||||||
m_curSet.add( typf );
|
m_curSet.addWithCheck( typf );
|
||||||
} else {
|
} else {
|
||||||
m_curSet.remove( typf );
|
m_curSet.removeWithCheck( typf );
|
||||||
if ( null != m_emptyWarner && 0 == m_curSet.size()) {
|
if ( null != m_emptyWarner && 0 == m_curSet.size()) {
|
||||||
m_emptyWarner.typeSetEmpty();
|
m_emptyWarner.typeSetEmpty();
|
||||||
}
|
}
|
||||||
|
|
|
@ -527,10 +527,7 @@ public class XWPrefs {
|
||||||
if ( -1 == flags ) {
|
if ( -1 == flags ) {
|
||||||
result = new CommsConnTypeSet();
|
result = new CommsConnTypeSet();
|
||||||
if ( getRelayEnabled( context ) ) {
|
if ( getRelayEnabled( context ) ) {
|
||||||
result.add( CommsConnType.COMMS_CONN_RELAY );
|
result.addWithCheck( CommsConnType.COMMS_CONN_RELAY );
|
||||||
}
|
|
||||||
if ( BuildConfig.OFFER_MQTT ) {
|
|
||||||
result.add( CommsConnType.COMMS_CONN_MQTT );
|
|
||||||
}
|
}
|
||||||
if ( BTService.BTEnabled() ) {
|
if ( BTService.BTEnabled() ) {
|
||||||
result.add( CommsConnType.COMMS_CONN_BT );
|
result.add( CommsConnType.COMMS_CONN_BT );
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class CommsAddrRec {
|
||||||
COMMS_CONN_SMS,
|
COMMS_CONN_SMS,
|
||||||
COMMS_CONN_P2P,
|
COMMS_CONN_P2P,
|
||||||
COMMS_CONN_NFC(false),
|
COMMS_CONN_NFC(false),
|
||||||
COMMS_CONN_MQTT;
|
COMMS_CONN_MQTT(false);
|
||||||
|
|
||||||
private boolean mIsSelectable = true;
|
private boolean mIsSelectable = true;
|
||||||
|
|
||||||
|
@ -199,6 +199,20 @@ public class CommsAddrRec {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addWithCheck( CommsConnType typ ) {
|
||||||
|
add( typ );
|
||||||
|
if ( BuildConfig.OFFER_MQTT && typ == CommsConnType.COMMS_CONN_RELAY ) {
|
||||||
|
add( CommsConnType.COMMS_CONN_MQTT );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeWithCheck( CommsConnType typ ) {
|
||||||
|
remove( typ );
|
||||||
|
if ( typ == CommsConnType.COMMS_CONN_RELAY ) {
|
||||||
|
remove( CommsConnType.COMMS_CONN_MQTT );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public String toString( Context context, boolean longVersion )
|
public String toString( Context context, boolean longVersion )
|
||||||
{
|
{
|
||||||
String result;
|
String result;
|
||||||
|
|
Loading…
Reference in a new issue