Skip to content

Commit b80a129

Browse files
committed
Release 2.0.2
1 parent fc7605e commit b80a129

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

aop/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 = '2.0.1'
2+
pluginVersion = '2.0.2'
33
Properties properties = new Properties()
44
if (project.file('local.properties').exists()) {
55
properties.load(project.file('local.properties').newDataInputStream())

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class SensorsAnalyticsClassVisitor extends ClassVisitor implements Opcodes {
120120

121121
@Override
122122
protected void onMethodExit(int opcode) {
123-
super.onMethodEnter()
123+
super.onMethodExit(opcode)
124124

125125
if (isSensorsDataIgnoreTrackOnClick) {
126126
return
@@ -201,6 +201,15 @@ class SensorsAnalyticsClassVisitor extends ClassVisitor implements Opcodes {
201201
return
202202
}
203203

204+
if (mClassName == 'android/databinding/generated/callback/OnClickListener') {
205+
if (nameDesc == 'onClick(Landroid/view/View;)V') {
206+
methodVisitor.visitVarInsn(ALOAD, 1)
207+
methodVisitor.visitMethodInsn(INVOKESTATIC, SensorsAnalyticsHookConfig.sSensorsAnalyticsAPI, "trackViewOnClick", "(Landroid/view/View;)V", false)
208+
isHasTracked = true
209+
return
210+
}
211+
}
212+
204213
if (mClassName.startsWith('android')) {
205214
return
206215
}

0 commit comments

Comments
 (0)