Skip to content

Commit 6a4d2ee

Browse files
committed
Apply code review suggestions
1 parent 57ff13d commit 6a4d2ee

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

java/ql/lib/semmle/code/java/dataflow/FlowSources.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ class ExportedAndroidContentProviderInput extends RemoteFlowSource, AndroidConte
271271
* calls `startActivityForResult` with an implicit Intent.
272272
*/
273273
class OnActivityResultIntentSource extends OnActivityResultIncomingIntent, RemoteFlowSource {
274-
OnActivityResultIntentSource() { isRemoteSource() }
274+
OnActivityResultIntentSource() { this.isRemoteSource() }
275275

276276
override string getSourceType() { result = "Android onActivityResult incoming Intent" }
277277
}

java/ql/lib/semmle/code/java/frameworks/android/OnActivityResultSource.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ class OnActivityResultIncomingIntent extends DataFlow::Node {
4242
// and the activity it belongs to defines `onActivityResult`.
4343
exists(MethodAccess ma |
4444
ma.getMethod().hasName(["add", "attach", "replace"]) and
45-
ma.getMethod().getDeclaringType().hasName("FragmentTransaction") and
45+
ma.getMethod().getDeclaringType().hasQualifiedName("android.app", "FragmentTransaction") and
4646
any(Argument arg | arg = ma.getAnArgument()).getType() = startingType
4747
or
4848
ma.getMethod().hasName("show") and
49-
ma.getMethod().getDeclaringType().getASupertype*().hasName("DialogFragment") and
49+
ma.getMethod()
50+
.getDeclaringType()
51+
.getASupertype*()
52+
.hasQualifiedName("android.app", "DialogFragment") and
5053
startingType = ma.getQualifier().getType()
5154
|
5255
ma.getEnclosingCallable().getDeclaringType() =

0 commit comments

Comments
 (0)