mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Apply code review suggestions
This commit is contained in:
@@ -271,7 +271,7 @@ class ExportedAndroidContentProviderInput extends RemoteFlowSource, AndroidConte
|
||||
* calls `startActivityForResult` with an implicit Intent.
|
||||
*/
|
||||
class OnActivityResultIntentSource extends OnActivityResultIncomingIntent, RemoteFlowSource {
|
||||
OnActivityResultIntentSource() { isRemoteSource() }
|
||||
OnActivityResultIntentSource() { this.isRemoteSource() }
|
||||
|
||||
override string getSourceType() { result = "Android onActivityResult incoming Intent" }
|
||||
}
|
||||
|
||||
@@ -42,11 +42,14 @@ class OnActivityResultIncomingIntent extends DataFlow::Node {
|
||||
// and the activity it belongs to defines `onActivityResult`.
|
||||
exists(MethodAccess ma |
|
||||
ma.getMethod().hasName(["add", "attach", "replace"]) and
|
||||
ma.getMethod().getDeclaringType().hasName("FragmentTransaction") and
|
||||
ma.getMethod().getDeclaringType().hasQualifiedName("android.app", "FragmentTransaction") and
|
||||
any(Argument arg | arg = ma.getAnArgument()).getType() = startingType
|
||||
or
|
||||
ma.getMethod().hasName("show") and
|
||||
ma.getMethod().getDeclaringType().getASupertype*().hasName("DialogFragment") and
|
||||
ma.getMethod()
|
||||
.getDeclaringType()
|
||||
.getASupertype*()
|
||||
.hasQualifiedName("android.app", "DialogFragment") and
|
||||
startingType = ma.getQualifier().getType()
|
||||
|
|
||||
ma.getEnclosingCallable().getDeclaringType() =
|
||||
|
||||
Reference in New Issue
Block a user