Skip to content

Commit 0193fa6

Browse files
authored
Merge pull request #213 from gaojun0816/master
Fixed callbacks in layout XML did not add to call graph bug
2 parents fa6e25d + 33af15e commit 0193fa6

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

soot-infoflow-android/src/soot/jimple/infoflow/android/callbacks/AbstractCallbackAnalyzer.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,12 @@ protected boolean invokesSetContentView(InvokeExpr inv) {
526526
|| curClass.getName().equals("android.support.v7.app.ActionBarActivity")
527527
|| curClass.getName().equals("android.support.v7.app.AppCompatActivity"))
528528
return true;
529-
if (curClass.declaresMethod("void setContentView(int)"))
530-
return false;
529+
// As long as the class is subclass of android.app.Activity,
530+
// it can be sure that the setContentView method is what we expected.
531+
// Following 2 statements make the overriding of method
532+
// setContentView ignored.
533+
// if (curClass.declaresMethod("void setContentView(int)"))
534+
// return false;
531535
curClass = curClass.hasSuperclass() ? curClass.getSuperclass() : null;
532536
}
533537
return false;

soot-infoflow-android/src/soot/jimple/infoflow/android/config/SootConfigForAndroid.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ public void setSootOptions(Options options, InfoflowConfiguration config) {
2525
List<String> excludeList = new LinkedList<String>();
2626
excludeList.add("java.*");
2727
excludeList.add("sun.*");
28-
excludeList.add("android.*");
28+
// exclude classes of android.* will cause layout class cannot be
29+
// loaded for layout file based callback analysis.
30+
// excludeList.add("android.*");
2931
excludeList.add("org.apache.*");
3032
excludeList.add("org.eclipse.*");
3133
excludeList.add("soot.*");

0 commit comments

Comments
 (0)