Fixed callbacks in layout XML did not add to call graph bug #213
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For the case where customized activity extends from
androidx.appcompat.app.AppCompatActivity, the invocation of the methodsetContentViewis used to find the corresponding layout XML file and the methodinvokesSetContentViewis used to judge the invocation ofsetContentView. However,invokesSetContentViewtreated the situation that one of the superclass except thanandroid.app.Activity,android.support.v7.app.ActionBarActivityandandroid.support.v7.app.AppCompatActivitywith declaring of methodsetContentViewas no invocation ofsetContentView. Since overriding method in the subclass is common such as it did inandroidx.appcompat.app.AppCompatActivity, this is obviously incorrect and caused the skip of layout file analysis and lead to the missing of layout-resided callbacks in the call graph.Also, for the case when activities extended from
android.support.v7.app.AppCompatActivity. As the default configuration sets inSootConfigForAndroidthat all classes start with android are excluded, during layout class loading inLayoutFileParser, relevant layout classes cannot be found thus leading to the skip of the layout file analysis.