mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 22:57:29 +00:00
java string bad
This commit is contained in:
parent
0ac4030b5f
commit
88ad77d94c
@ -27,15 +27,15 @@ public final class UpdateChecker extends AsyncTask<Void, Void, Boolean> {
|
|||||||
|
|
||||||
HttpURLConnection conn =
|
HttpURLConnection conn =
|
||||||
(HttpURLConnection) new URL("https://github.com/austinhuang0131/instagrabber/releases/latest").openConnection();
|
(HttpURLConnection) new URL("https://github.com/austinhuang0131/instagrabber/releases/latest").openConnection();
|
||||||
conn.setUseCaches(false);
|
|
||||||
conn.setInstanceFollowRedirects(false);
|
conn.setInstanceFollowRedirects(false);
|
||||||
|
conn.setUseCaches(false);
|
||||||
conn.setRequestProperty("User-Agent", Constants.A_USER_AGENT);
|
conn.setRequestProperty("User-Agent", Constants.A_USER_AGENT);
|
||||||
conn.connect();
|
conn.connect();
|
||||||
|
|
||||||
final int responseCode = conn.getResponseCode();
|
final int responseCode = conn.getResponseCode();
|
||||||
if (responseCode == HttpURLConnection.HTTP_MOVED_TEMP && !BuildConfig.DEBUG) {
|
if (responseCode == HttpURLConnection.HTTP_MOVED_TEMP) {
|
||||||
version = conn.getHeaderField("Location").split("/v")[1];
|
version = conn.getHeaderField("Location").split("/v")[1];
|
||||||
return version != BuildConfig.VERSION_NAME;
|
return !version.equals(BuildConfig.VERSION_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
conn.disconnect();
|
conn.disconnect();
|
||||||
|
Loading…
Reference in New Issue
Block a user