Hi all,
I apologize in advance if this question already has an answer or seems naive. I was looking through the following thread:
I believe I am facing an issue because of the same root cause as this, when building a call graph for the following class:
public class MainActivity extends AppCompatActivity {
Button callBtn;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
this.callBtn = (Button) findViewById(R.id.callBtn);
this.callBtn.setOnClickListener(new View.OnClickListener() { // from class: com.parjanya.samplepermissionapp.MainActivity.2
@Override
public void onClick(View view) {
MainActivity.this.startNewActivity(PhoneCallActivity.class);
}
});
}
public void startNewActivity(Class<?> activityClass) {
startActivity(new Intent(this, activityClass));
}
}
I include
MainActivity$2::onClick as an entrypoint when creating a call graph using the vanilla zero-one CFA builder.
The node corresponding to the invocation of startNewActivity in this call graph does not have a successor node. Therefore, I cannot find a node in the entire call graph that has an
invocation to startActivity as an SSAAbstractInvokeInstruction in its basic block.
A subclass of Entrypoint with an overriden implementation of makeArgument function was suggested as a possible solution to this problem.
However, I am not really sure what enhancements should be done, or how to go about doing this, since I am fairly new to WALA.
Can you please help me out or point me in the right direction?
Thanks a lot!
Yours
Parjanya Vyas