RequiresPermissionChecker: change detection method
Change the way the checker find the intent and the permission by using
the order instead of using the name of the variable. (since some target
have their parameters name being obfuscated prior to pass them to the
annotation processor)
Also fix when the intent is set in a chained pattern like:
new Intent(Foo).putExtra(...)
Add various test to make sure the new detection works for differently
ordered parameters
Fix checkstyle reported errors and move some check to be early return
instead of having a unneeded indentation level
Bug: 352610940
Fix: 352610940
Test: atest error_prone_android_framework_test | for unit test
Test: m Bluetooth and check the warning / errors
Flag: TEST_ONLY
Change-Id: I9308c08c7275708c5b1db3f35a9753563ba05dc9
4 files changed