diff options
author | Christian S <christian@pix-art.de> | 2015-09-21 20:00:22 +0200 |
---|---|---|
committer | Christian S <christian@pix-art.de> | 2015-09-21 20:00:22 +0200 |
commit | fc5b1e515a7ec33868ebf49283b5b7cb34c1204a (patch) | |
tree | c7a886e851997fe90df9581c86246261e4365e4b /src | |
parent | 7fc2675834c9ce6e80503dd80ae84514fd6f4fa8 (diff) |
made app update time configurable in config.java
and increased update check time to once a day
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/Config.java | 1 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/Config.java b/src/main/java/eu/siacs/conversations/Config.java index a0781581f..a3bf20489 100644 --- a/src/main/java/eu/siacs/conversations/Config.java +++ b/src/main/java/eu/siacs/conversations/Config.java @@ -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", diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index 20f965bbc..8783216b3 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -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); |