Skip to content

Commit d044625

Browse files
author
weiqiangliu
committed
Release 3.4.4
1 parent 1e88d5a commit d044625

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

plugin/ext.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project.ext {
2-
pluginVersion = '3.4.3'
2+
pluginVersion = '3.4.4'
33
Properties properties = new Properties()
44
if (project.file('local.properties').exists()) {
55
properties.load(project.file('local.properties').newDataInputStream())

plugin/src/main/groovy/com/sensorsdata/analytics/android/plugin/SensorsAnalyticsClassVisitor.groovy

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class SensorsAnalyticsClassVisitor extends ClassVisitor {
3333
private String mSuperName
3434
private String[] mInterfaces
3535
private HashSet<String> visitedFragMethods = new HashSet<>()// 无需判空
36-
private Boolean isFoundOnNewIntent = null
36+
private boolean isFoundOnNewIntent = false
3737
private ClassVisitor classVisitor
3838

3939
private SensorsAnalyticsTransformHelper transformHelper
@@ -106,8 +106,8 @@ class SensorsAnalyticsClassVisitor extends ClassVisitor {
106106
@Override
107107
void visitEnd() {
108108
super.visitEnd()
109-
if (!transformHelper.extension.disableTrackPush && isFoundOnNewIntent != null && !isFoundOnNewIntent && mSuperName == "android/app/Activity") {
110-
SensorsPushInjected.addOnNewIntent(classVisitor);
109+
if (!transformHelper.extension.disableTrackPush && !isFoundOnNewIntent && mSuperName == "android/app/Activity") {
110+
SensorsPushInjected.addOnNewIntent(classVisitor)
111111
}
112112

113113
if (SensorsAnalyticsUtil.isInstanceOfFragment(mSuperName)) {
@@ -185,11 +185,8 @@ class SensorsAnalyticsClassVisitor extends ClassVisitor {
185185
return null
186186
}
187187
}
188-
if (mSuperName == "android/app/Activity") {
189-
isFoundOnNewIntent = false
190-
if (name == "onNewIntent" && desc == "(Landroid/content/Intent;)V") {
191-
isFoundOnNewIntent = true
192-
}
188+
if (mSuperName == "android/app/Activity" && name == "onNewIntent" && desc == "(Landroid/content/Intent;)V") {
189+
isFoundOnNewIntent = true
193190
}
194191

195192
MethodVisitor methodVisitor = cv.visitMethod(access, name, desc, signature, exceptions)
@@ -265,7 +262,7 @@ class SensorsAnalyticsClassVisitor extends ClassVisitor {
265262
nameDesc = name + desc
266263
// Hook Push
267264
if (!SensorsAnalyticsUtil.isStatic(access) && !transformHelper.extension.disableTrackPush) {
268-
SensorsPushInjected.handlePush(methodVisitor, mSuperName, mClassName, nameDesc, transformHelper.urlClassLoader)
265+
SensorsPushInjected.handlePush(methodVisitor, mSuperName, nameDesc)
269266
}
270267

271268
pubAndNoStaticAccess = SensorsAnalyticsUtil.isPublic(access) && !SensorsAnalyticsUtil.isStatic(access)

plugin/src/main/groovy/com/sensorsdata/analytics/android/plugin/SensorsAnalyticsTransform.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import java.util.jar.JarOutputStream
4848

4949
class SensorsAnalyticsTransform extends Transform {
5050
private SensorsAnalyticsTransformHelper transformHelper
51-
public static final String VERSION = "3.4.3"
51+
public static final String VERSION = "3.4.4"
5252
public static final String MIN_SDK_VERSION = "5.4.3"
5353
private WaitableExecutor waitableExecutor
5454
private URLClassLoader urlClassLoader

plugin/src/main/groovy/com/sensorsdata/analytics/android/plugin/push/SensorsPushInjected.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ public class SensorsPushInjected {
1616
*
1717
* @param methodVisitor MethodVisitor
1818
* @param superName 父类名
19-
* @param className 类名
2019
* @param nameDesc 描述
2120
*/
22-
public static void handlePush(MethodVisitor methodVisitor, String superName, String className, String nameDesc, ClassLoader classLoader) {
21+
public static void handlePush(MethodVisitor methodVisitor, String superName, String nameDesc) {
2322
if ("cn/jpush/android/service/JPushMessageReceiver".equals(superName)
2423
&& "onNotifyMessageOpened(Landroid/content/Context;Lcn/jpush/android/api/NotificationMessage;)V".equals(nameDesc)) {
2524
handleJPush(methodVisitor);

0 commit comments

Comments
 (0)