aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-02-24 21:31:29 +0100
committerChristian Schneppe <christian@pix-art.de>2017-02-24 21:31:29 +0100
commit3b4949fc5038af87ce08b2bf553d4c3a17d8240f (patch)
treecc28ed038026ac9278bb437c50dbf669f4edbf00 /src/main/java/de/pixart/messenger
parent7e206d0039fbe843439ccd5894ea0dbaf56354e1 (diff)
AppUpdater: detect beta versions
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/ui/UpdaterActivity.java21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java b/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java
index 7e5220609..066a2fd39 100644
--- a/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/UpdaterActivity.java
@@ -182,15 +182,24 @@ public class UpdaterActivity extends Activity {
private int checkVersion(String remoteVersion, String installedVersion) {
String[] remote = null;
String[] installed = null;
+ String[] remoteV = null;
+ String[] installedV = null;
try {
- remote = remoteVersion.split("\\.");
- } catch (Exception ignored) {
- //ignored
+ installedV = installedVersion.split(" ");
+ Log.d(Config.LOGTAG, "Updater Version installed: " + installedV[0]);
+ installed = installedV[0].split("\\.");
+ } catch (Exception e) {
+ e.printStackTrace();
}
try {
- installed = installedVersion.split("\\.");
- } catch (Exception ignored) {
- //ignored
+ remoteV = remoteVersion.split(" ");
+ if (installedV[1] != null) {
+ remoteV[0] = remoteV[0] + ".1";
+ }
+ Log.d(Config.LOGTAG, "Updater Version on server: " + remoteV[0]);
+ remote = remoteV[0].split("\\.");
+ } catch (Exception e) {
+ e.printStackTrace();
}
int i = 0;
// set index to first non-equal ordinal or length of shortest localVersion string