From 5299fe83e45c2f59d99d84d10a99de43fed2b518 Mon Sep 17 00:00:00 2001 From: stom79 Date: Sun, 19 Nov 2017 14:20:44 +0100 Subject: [PATCH] Prepares release 1.6.0-rc-2 --- app/build.gradle | 6 +++--- .../gouv/etalab/mastodon/activities/BaseMainActivity.java | 1 - .../fr/gouv/etalab/mastodon/client/HttpsConnection.java | 7 +++++++ .../main/java/fr/gouv/etalab/mastodon/helper/Helper.java | 6 +----- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f41caccf6..956a5a55f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,13 +2,13 @@ apply plugin: 'com.android.application' android { compileSdkVersion 27 - buildToolsVersion "27.0.0" + buildToolsVersion "27.0.1" defaultConfig { applicationId "fr.gouv.etalab.mastodon" minSdkVersion 15 targetSdkVersion 27 - versionCode 74 - versionName "1.6.0-rc-1" + versionCode 75 + versionName "1.6.0-rc-2" } flavorDimensions "default" buildTypes { diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/activities/BaseMainActivity.java b/app/src/main/java/fr/gouv/etalab/mastodon/activities/BaseMainActivity.java index 66e355c84..704a000a0 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/activities/BaseMainActivity.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/activities/BaseMainActivity.java @@ -110,7 +110,6 @@ import static fr.gouv.etalab.mastodon.helper.Helper.NOTIFICATION_INTENT; import static fr.gouv.etalab.mastodon.helper.Helper.PREF_KEY_ID; import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor; import static fr.gouv.etalab.mastodon.helper.Helper.changeUser; -import static fr.gouv.etalab.mastodon.helper.Helper.logout; import static fr.gouv.etalab.mastodon.helper.Helper.menuAccounts; import static fr.gouv.etalab.mastodon.helper.Helper.unCheckAllMenuItems; import static fr.gouv.etalab.mastodon.helper.Helper.updateHeaderAccountInfo; diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/client/HttpsConnection.java b/app/src/main/java/fr/gouv/etalab/mastodon/client/HttpsConnection.java index 5f93df333..5644dcac3 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/client/HttpsConnection.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/client/HttpsConnection.java @@ -95,6 +95,7 @@ public class HttpsConnection { httpsURLConnection = (HttpsURLConnection)url.openConnection(); httpsURLConnection.setConnectTimeout(timeout * 1000); httpsURLConnection.setRequestProperty("http.keepAlive", "false"); + httpsURLConnection.setRequestProperty("User-Agent", Helper.USER_AGENT); if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) httpsURLConnection.setSSLSocketFactory(new TLSSocketFactory()); if( token != null) @@ -142,6 +143,7 @@ public class HttpsConnection { byte[] postDataBytes = postData.toString().getBytes("UTF-8"); httpsURLConnection = (HttpsURLConnection)url.openConnection(); + httpsURLConnection.setRequestProperty("User-Agent", Helper.USER_AGENT); httpsURLConnection.setConnectTimeout(timeout * 1000); httpsURLConnection.setDoOutput(true); if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) @@ -173,6 +175,7 @@ public class HttpsConnection { try { url = new URL(downloadUrl); httpsURLConnection = (HttpsURLConnection) url.openConnection(); + httpsURLConnection.setRequestProperty("User-Agent", Helper.USER_AGENT); int responseCode = httpsURLConnection.getResponseCode(); // always check HTTP response code first @@ -283,6 +286,7 @@ public class HttpsConnection { byte[] pixels = ous.toByteArray(); httpsURLConnection = (HttpsURLConnection) url.openConnection(); + httpsURLConnection.setRequestProperty("User-Agent", Helper.USER_AGENT); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) httpsURLConnection.setSSLSocketFactory(new TLSSocketFactory()); httpsURLConnection.setDoInput(true); @@ -406,6 +410,7 @@ public class HttpsConnection { byte[] postDataBytes = postData.toString().getBytes("UTF-8"); httpsURLConnection = (HttpsURLConnection)url.openConnection(); + httpsURLConnection.setRequestProperty("User-Agent", Helper.USER_AGENT); httpsURLConnection.setConnectTimeout(timeout * 1000); if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) httpsURLConnection.setSSLSocketFactory(new TLSSocketFactory()); @@ -462,6 +467,7 @@ public class HttpsConnection { byte[] postDataBytes = postData.toString().getBytes("UTF-8"); httpsURLConnection = (HttpsURLConnection)url.openConnection(); + httpsURLConnection.setRequestProperty("User-Agent", Helper.USER_AGENT); httpsURLConnection.setConnectTimeout(timeout * 1000); if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) httpsURLConnection.setSSLSocketFactory(new TLSSocketFactory()); @@ -515,6 +521,7 @@ public class HttpsConnection { byte[] postDataBytes = postData.toString().getBytes("UTF-8"); httpsURLConnection = (HttpsURLConnection)url.openConnection(); + httpsURLConnection.setRequestProperty("User-Agent", Helper.USER_AGENT); if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) httpsURLConnection.setSSLSocketFactory(new TLSSocketFactory()); if( token != null) diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java b/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java index b076cdc77..f6d65e2f3 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java @@ -125,11 +125,7 @@ import java.util.regex.Pattern; import fr.gouv.etalab.mastodon.BuildConfig; import fr.gouv.etalab.mastodon.R; import fr.gouv.etalab.mastodon.activities.HashTagActivity; -import fr.gouv.etalab.mastodon.activities - - - - .LoginActivity; +import fr.gouv.etalab.mastodon.activities.LoginActivity; import fr.gouv.etalab.mastodon.activities.MainActivity; import fr.gouv.etalab.mastodon.activities.ShowAccountActivity; import fr.gouv.etalab.mastodon.activities.WebviewActivity;