diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2021-08-11 21:09:02 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2021-08-11 21:09:14 -0600 |
commit | 5977cfeb9bfe5efcc3457d3fdf2d10f24e5ac395 (patch) | |
tree | c8e907249c1ea9930c3e5ea253b164c72c157ddb /app/src/main/java/me/brysonsteck/wiimmfiwatcher/Updater.java | |
parent | ed69b7725f08f8657054ffe7bdf2df4de1dd9b4d (diff) | |
download | wiimmfi-watcher-5977cfeb9bfe5efcc3457d3fdf2d10f24e5ac395.tar wiimmfi-watcher-5977cfeb9bfe5efcc3457d3fdf2d10f24e5ac395.tar.gz wiimmfi-watcher-5977cfeb9bfe5efcc3457d3fdf2d10f24e5ac395.tar.bz2 |
preparing settings fragment, added new "null" catch for updater"
Diffstat (limited to 'app/src/main/java/me/brysonsteck/wiimmfiwatcher/Updater.java')
-rw-r--r-- | app/src/main/java/me/brysonsteck/wiimmfiwatcher/Updater.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/Updater.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/Updater.java index eb3e813..78e97c1 100644 --- a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/Updater.java +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/Updater.java @@ -13,6 +13,7 @@ import java.net.URLConnection; public class Updater { public boolean outdated = false; + public boolean failed = false; public String newestRelease; public String githubRelease; public String playStore = "https://play.google.com/store/apps/details?id=me.brysonsteck.wiimmfiwatcher"; @@ -54,7 +55,10 @@ public class Updater { } public void compareRelease(String deviceRelease) { - if (!deviceRelease.equals(newestRelease)) { + if (newestRelease == null) { + failed = true; + } + else if (!deviceRelease.equals(newestRelease)) { outdated = true; } } @@ -63,6 +67,8 @@ public class Updater { return outdated; } + public boolean hasFailed() { return failed; } + public String getNewestRelease() { return newestRelease; } |