mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
re-register when variant changes
useful only for testing releases
This commit is contained in:
parent
d4ae2e1f06
commit
755b9e4c1f
1 changed files with 4 additions and 3 deletions
|
@ -302,7 +302,8 @@ public class MQTTUtils extends Thread implements IMqttActionListener, MqttCallba
|
|||
}
|
||||
long now = Utils.getCurSeconds();
|
||||
Log.d( TAG, "registerOnce(): now: %d; nextReg: %d", now, sNextReg );
|
||||
if ( now > sNextReg || ! BuildConfig.GIT_REV.equals(sLastRev) ) {
|
||||
String revString = BuildConfig.GIT_REV + ':' + BuildConfig.VARIANT_NAME;
|
||||
if ( now > sNextReg || ! revString.equals(sLastRev) ) {
|
||||
try {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put( "devid", mDevID );
|
||||
|
@ -334,8 +335,8 @@ public class MQTTUtils extends Thread implements IMqttActionListener, MqttCallba
|
|||
if ( 0 < atNext ) {
|
||||
DBUtils.setLongFor( mContext, KEY_NEXT_REG, atNext );
|
||||
sNextReg = atNext;
|
||||
DBUtils.setStringFor( mContext, KEY_LAST_WRITE, BuildConfig.GIT_REV );
|
||||
sLastRev = BuildConfig.GIT_REV;
|
||||
DBUtils.setStringFor( mContext, KEY_LAST_WRITE, revString );
|
||||
sLastRev = revString;
|
||||
}
|
||||
|
||||
String dupID = response.optString( "dupID", "" );
|
||||
|
|
Loading…
Reference in a new issue