X Tutup
Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,20 @@ public JBlock removeBody(JMethod method) {
JBlock clonedBody = new JBlock(false, false);

for (Object statement : body.getContents()) {
clonedBody.add((JStatement) statement);
if (statement instanceof JVar) {
JVar var = (JVar) statement;
try {
Field varInitField = JVar.class.getDeclaredField("init");
varInitField.setAccessible(true);
JExpression varInit = (JExpression) varInitField.get(var);

clonedBody.decl(var.type(), var.name(), varInit);
} catch (Exception e) {
throw new RuntimeException(e);
}
} else {
clonedBody.add((JStatement) statement);
}
}

return clonedBody;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class TracedActivity extends Activity {
public boolean overloadedMethodInt = false;
public boolean overloadedMethodIntFLoat = false;

@Trace
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down
X Tutup