<div dir="ltr"><div>Suppose we have 2 threads called from 2 UI callbacks. One of them calls method sensitive(), another one is empty. In the call graph, both events will have a path to sensitive(), as if the two Thread instances were modeled as one:<br><span style="color:rgb(128,128,0)"></span><br></div><div><span style="color:rgb(128,128,0)"></span><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:&quot;Courier New&quot;;font-size:9.6pt"><span style="color:rgb(0,0,128);font-weight:bold">protected void </span>onCreate(Bundle savedInstanceState) {<span style="color:rgb(128,128,128);font-style:italic"><br></span><span style="color:rgb(128,128,128);font-style:italic">    </span><span style="color:rgb(0,0,128);font-weight:bold"></span>threadWithSensitive();<br>}<br><br><span style="color:rgb(128,128,0)">@Override<br></span><span style="color:rgb(0,0,128);font-weight:bold">public boolean </span>onOptionsItemSelected(MenuItem item) {<span style="color:rgb(128,128,128);font-style:italic"><br></span><span style="color:rgb(128,128,128);font-style:italic">    </span>emptyThread();<br>    <span style="color:rgb(0,0,128);font-weight:bold">return false</span>;<br>}</pre><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:&quot;Courier New&quot;;font-size:9.6pt"><span style="color:rgb(0,0,128);font-weight:bold">private void </span>threadWithSensitive() {<br>    <span style="color:rgb(0,0,128);font-weight:bold">new </span>Thread(<span style="color:rgb(0,0,128);font-weight:bold">new </span>Runnable() {<span style="color:rgb(128,128,0)"><br></span><span style="color:rgb(128,128,0)">        </span><span style="color:rgb(0,0,128);font-weight:bold">public void </span>run() {<br>            sensitive<span style="font-style:italic"></span>();<br>        }<br>    }).start();<br>}<br><br><span style="color:rgb(0,0,128);font-weight:bold">private void </span>emptyThread() {<br>    <span style="color:rgb(0,0,128);font-weight:bold">new </span>Thread(<span style="color:rgb(0,0,128);font-weight:bold">new </span>Runnable() {<span style="color:rgb(128,128,0)"><br></span><span style="color:rgb(128,128,0)">        </span><span style="color:rgb(0,0,128);font-weight:bold">public void </span>run() { }<br>    }).start();<br>}</pre>Shouldn&#39;t only onCreate() lead to sensitive() ?<br><br></div><div>My setup: a crafted android.jar that has stubs for android classes but full implementation for java.* and javax.* packages.<br></div><div><br></div><div>I also noticed that class <span style="background-color:rgb(228,228,255)">MethodContext</span> which is supposed to model a method in its context, is never instantiated, regardless of what call graph algorithm I use.<br><br></div><div>What am I missing?<br><br></div><div>thanks,<br></div><div><div>-- <br><div class="gmail_signature"><div dir="ltr">Denis<br></div></div>
</div></div></div>