Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 779dbee

Browse files
committed
Merge remote-tracking branch 'origin/devleop_4x'
# Conflicts: # app/build.gradle # netspylib/build.gradle
2 parents d7d43da + 23aac0e commit 779dbee

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ https://www.jianshu.com/p/12995ed85a38
77

88
####项目引用:
99
```
10-
implementation 'com.creditease:netspylib:4.7.7'
10+
implementation 'com.creditease:netspylib:4.7.9'
1111
```
1212
####项目介绍:
1313
项目历经十几个版本,从只是记录接口返回,到现在已经逐步扩展到,接口数据镜像,异常记录与上传等实用功能。

netspylib/src/main/java/com/creditease/netspy/BugSpyHelper.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.creditease.netspy;
22

3-
import android.app.Application;
43
import android.content.Context;
54
import android.content.Intent;
65

@@ -22,15 +21,13 @@ public final class BugSpyHelper implements Thread.UncaughtExceptionHandler {
2221
static String deviceInfo = "";
2322

2423
private Thread.UncaughtExceptionHandler exceptionHandler;
25-
private Application app;
2624

27-
private BugSpyHelper(Application app) {
25+
private BugSpyHelper() {
2826
this.exceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
29-
this.app = app;
3027
}
3128

32-
static void install(Application app) {
33-
Thread.setDefaultUncaughtExceptionHandler(new BugSpyHelper(app));
29+
static void install() {
30+
Thread.setDefaultUncaughtExceptionHandler(new BugSpyHelper());
3431
}
3532

3633
/**

netspylib/src/main/java/com/creditease/netspy/NetSpyHelper.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ public static void install(Application netSpyApp, String source) {
3333

3434
//总初始化
3535
public static void install(Application netSpyApp, String source, String baseURL, String strParamSet) {
36-
NetSpyHelper.setSource(source);
36+
//NetSpyHelper相关参数的初始化
3737
NetSpyHelper.setSpyApp(netSpyApp);
38+
NetSpyHelper.setSource(source);
3839

3940
//BugSpyHelper注册异常监控的初始化
40-
BugSpyHelper.install(netSpyApp);
41+
BugSpyHelper.install();
4142

4243
//ApiMockHelper相关参数的初始化
4344
ApiMockHelper.initBaseURL(baseURL);
@@ -84,6 +85,8 @@ public static void launchActivity(Context context) {
8485
}
8586
}
8687

88+
/*********************************************http相关***************************************/
89+
8790
//加入event 例如api/reward/fee
8891
public static void insertHttpEvent(String method, String url, String response) {
8992
insertHttpEvent(NetSpyHelper.getSource(), method, url, response);

0 commit comments

Comments
 (0)