aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2020-01-31 15:14:57 +0100
committerChristian Schneppe <christian.schneppe@pix-art.de>2020-01-31 15:14:57 +0100
commitb3ee23d8f08c848ef6f25a9616914414e0079bf1 (patch)
tree400fea3a0c85224a669e4f2d07fec6a1e4f74fd0 /src
parent18be460e10f7bd3f80ec5839a37bed17380e6446 (diff)
change updater a bit
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/services/UpdateService.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/services/UpdateService.java b/src/main/java/de/pixart/messenger/services/UpdateService.java
index 5c0313320..64347bd5a 100644
--- a/src/main/java/de/pixart/messenger/services/UpdateService.java
+++ b/src/main/java/de/pixart/messenger/services/UpdateService.java
@@ -15,6 +15,7 @@ import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
+import java.util.Arrays;
import javax.net.ssl.HttpsURLConnection;
@@ -82,7 +83,7 @@ public class UpdateService extends AsyncTask<String, Object, UpdateService.Wrapp
JSONObject json = new JSONObject(jsonString.toString());
if (json.getBoolean("success") && json.has("latestVersion") && json.has("appURI") && json.has("filesize")) {
String version = json.getString("latestVersion");
- String[] ownVersion = BuildConfig.VERSION_NAME.split("-");
+ String[] ownVersion = BuildConfig.VERSION_NAME.split(" ");
String url = json.getString("appURI");
String filesize = json.getString("filesize");
String changelog = "";
@@ -90,11 +91,11 @@ public class UpdateService extends AsyncTask<String, Object, UpdateService.Wrapp
changelog = json.getString("changelog");
}
if (checkVersion(version, ownVersion[0]) >= 1) {
- Log.d(Config.LOGTAG, "AppUpdater: Version " + ownVersion[0] + " should be updated to " + version);
+ Log.d(Config.LOGTAG, "AppUpdater: Version " + Arrays.toString(ownVersion) + " should be updated to " + version);
UpdateAvailable = true;
showNotification(url, changelog, version, filesize, store);
} else {
- Log.d(Config.LOGTAG, "AppUpdater: Version " + ownVersion[0] + " is up to date");
+ Log.d(Config.LOGTAG, "AppUpdater: Version " + Arrays.toString(ownVersion) + " is up to date");
UpdateAvailable = false;
}
}