Closed redmi111 closed 1 year ago
Can you provide the APK file? If code does not work this could also be caused in a bug in the APK you have decompiled. So we have to check Smali code to see if ||
is correct or &&
.
public final void onClick(View var1) {
long uptimeMillis = SystemClock.uptimeMillis();
long lastClickTime = this.mLastClickTime;
this.mLastClickTime = uptimeMillis;
if (uptimeMillis - lastClickTime > 250L && this.context != null) {
this.onSingleClick(var1);
Vibrator var7 = (Vibrator)this.context.getSystemService("vibrator");
}
}
}
public final void onClick(View view) {
long uptimeMillis = SystemClock.uptimeMillis();
this.mLastClickTime = uptimeMillis;
if (uptimeMillis - this.mLastClickTime <= MIN_CLICK_INTERVAL || this.context == null) {
return;
}
onSingleClick(view);
Vibrator vibrator = (Vibrator) this.context.getSystemService("vibrator");
}
}
I compared the code from fernflower(dex2jar conversion) and JADX (above fern and below jadx) the fernflower version works fine.
https://we.tl/t-VfW6ozaOm5 APK link
Check the remote button click listener inside utils package. I went back and tried JADX v1.0.0 and it decompiles fine on that version
Oh, condition operator is correct here, but jadx moved field getter after field assignment so check in condition became useless :cry: I commit a fix, so code now will be:
long uptimeMillis = SystemClock.uptimeMillis();
long j = uptimeMillis - this.mLastClickTime;
this.mLastClickTime = uptimeMillis;
if (j <= MIN_CLICK_INTERVAL || this.context == null) {
return;
}
onSingleClick(view);
...
The above code is generated by the JADX in one APK but it was wrong (not functioning).