diff --git a/src/info/palant/apkInstrumentation/CallRemover.java b/src/info/palant/apkInstrumentation/CallRemover.java index c1ff12e..a95335d 100644 --- a/src/info/palant/apkInstrumentation/CallRemover.java +++ b/src/info/palant/apkInstrumentation/CallRemover.java @@ -12,6 +12,8 @@ import soot.Body; import soot.BodyTransformer; import soot.SootMethod; +import soot.jimple.AssignStmt; +import soot.jimple.NullConstant; public class CallRemover extends BodyTransformer { @@ -40,7 +42,15 @@ protected void internalTransform(Body body, String phaseName, Map { SootMethod method = UnitParser.getInvocationMethod(unit); - return method != null && this.methodConfig.get(method) != null; + if (method != null && this.methodConfig.get(method) != null) + { + AssignStmt assignment = UnitParser.getAssignment(unit); + if (assignment != null) + assignment.setRightOp(NullConstant.v()); + else + return true; + } + return false; }); body.validate();