made app update time configurable in config.java

and increased update check time to once a day
This commit is contained in:
Christian S 2015-09-21 20:00:22 +02:00
parent 7fc2675834
commit fc5b1e515a
2 changed files with 2 additions and 2 deletions

View file

@ -57,6 +57,7 @@ public final class Config {
public static final int TYPING_TIMEOUT = 5;
public static final String UPDATE_URL = "http://xmpp.pix-art.de/update/";
public static final long UPDATE_CHECK_TIMER = 24 * 60 * 60; // in seconds
public static final String ENABLED_CIPHERS[] = {
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",

View file

@ -19,7 +19,6 @@ import android.provider.MediaStore;
import android.support.v4.widget.SlidingPaneLayout;
import android.support.v4.widget.SlidingPaneLayout.PanelSlideListener;
import android.util.Log;
import android.util.TypedValue;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
@ -323,7 +322,7 @@ public class ConversationActivity extends XmppActivity
Log.d(Config.LOGTAG, "AppUpdater - LastUpdateTime: " + lastUpdateTime);
if ((lastUpdateTime + (60 * 60 * 1000)) < System.currentTimeMillis()) {
if ((lastUpdateTime + (Config.UPDATE_CHECK_TIMER * 1000)) < System.currentTimeMillis()) {
lastUpdateTime = System.currentTimeMillis();
SharedPreferences.Editor editor = UpdateTimeStamp.edit();
editor.putLong("lastUpdateTime", lastUpdateTime);