Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
3.7.7
Browse files Browse the repository at this point in the history
  • Loading branch information
WangDaYeeeeee committed Oct 6, 2019
1 parent c1af528 commit 978a16b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 52 deletions.
2 changes: 1 addition & 1 deletion base/build.gradle
Expand Up @@ -83,7 +83,7 @@ dependencies {
api 'com.github.nekocode.rxlifecycle:rxlifecycle-compact:2.0'

// bugly.
api 'com.tencent.bugly:crashreport:2.8.6.0'
// api 'com.tencent.bugly:crashreport:2.8.6.0'

// arouter.
api 'com.alibaba:arouter-api:1.5.0'
Expand Down
Expand Up @@ -10,7 +10,7 @@ public class UrlCollection {
public static final String UNSPLASH_API_BASE_URL = "https://api.unsplash.com/";
public static final String STREAM_API_BASE_URL = "https://api.getstream.io/";
public static final String UNSPLASH_FOLLOWING_FEED_URL = "feeds/following";
public static final String UNSPLASH_NODE_API_URL = "napi/";
public static final String UNSPLASH_NODE_API_URL = "";
public static final String UNSPLASH_URL = "https://unsplash.com/";
public static final String UNSPLASH_JOIN_URL = "https://unsplash.com/join";
public static final String UNSPLASH_SUBMIT_URL = "https://unsplash.com/submit";
Expand Down
Expand Up @@ -49,42 +49,6 @@ public Response intercept(@NonNull Chain chain) {
}

private Response buildResponse(Request request, Response response) throws Exception {
// return response;

ResponseBody body = response.body();
if (body == null) {
return response;
}

BufferedSource source = body.source();
source.request(Long.MAX_VALUE); // Buffer the entire body.
Buffer buffer = source.buffer();

if ("gzip".equalsIgnoreCase(response.headers().get("Content-Encoding"))) {
try (GzipSource gzippedResponseBody = new GzipSource(buffer.clone())) {
buffer = new Buffer();
buffer.writeAll(gzippedResponseBody);
}
}

Charset charset = UTF8;
MediaType contentType = body.contentType();
if (contentType != null) {
charset = contentType.charset(UTF8);
}

String bodyString = "";
if (charset != null) {
bodyString = buffer.clone().readString(charset);
}

return new Response.Builder()
.addHeader("Content-Type", "application/json")
.code(response.code())
.body(ResponseBody.create(body.contentType(), bodyString))
.message(response.message())
.request(request)
.protocol(Protocol.HTTP_2)
.build();
return response;
}
}
Expand Up @@ -2,18 +2,18 @@

import android.content.Context;

import com.tencent.bugly.crashreport.CrashReport;
// import com.tencent.bugly.crashreport.CrashReport;

/**
* Crash report helper.
* */
public class CrashReportHelper {

public static void init(Context context) {
CrashReport.initCrashReport(context.getApplicationContext(), "c8ad99bd5d", false);
// CrashReport.initCrashReport(context.getApplicationContext(), "c8ad99bd5d", false);
}

public static void report(Throwable t) {
CrashReport.postCatchedException(t);
// CrashReport.postCatchedException(t);
}
}
19 changes: 9 additions & 10 deletions gradle.properties
Expand Up @@ -18,19 +18,18 @@ COMPILE_SDK_VERSION=29
MIN_SDK_VERSION=19
TARGET_SDK_VERSION=29

android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m

APP_ID_BETA="41f1f23556b01d63b1ae823bdf008cc32ce446f77c843e2daa2a80c770015df3";
SECRET_BETA="dec952db51b50babd1ba55e26b7dbbd596ae03554a59c0055864826f7565c94e";

APP_ID_RELEASE="7a96a77d719e9967f935da53784d6a3eb58a4fb174dda25e89ec69059e46c815";
SECRET_RELEASE="dd766f4ee6e01599ca6db2e97c306a883a024f7322f92d4f7ab4aeae3be7924e";
APP_ID_RELEASE="";
SECRET_RELEASE="";

FEED_TOKEN="39fe9fe57da901c9f654b7b7b4dab047568e4412d41b3bbb5f96c61f28632a12";
FEED_TOKEN="";

APP_ID_RELEASE_UNAUTH="7a96a77d719e9967f935da53784d6a3eb58a4fb174dda25e89ec69059e46c815";
APP_ID_RELEASE_UNAUTH="";

GET_STREAM_KEY="ava9r3mbqgqt";
GET_STREAM_AUTH_CODE="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNvdXJjZSI6IioiLCJhY3Rpb24iOiIqIiwiZmVlZF9pZCI6Im5vdGlmaWNhdGlvbjMwMDAxNCJ9.omzfnsa0sbnBnHfRvFu5_EMAM3abkZ5Viesl7h-MoWc";
GET_STREAM_KEY="";
GET_STREAM_AUTH_CODE="";

android.useAndroidX=true
android.enableJetifier=true

0 comments on commit 978a16b

Please sign in to comment.