mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Apply suggestions from code review
Co-authored-by: Chris Smowton <smowton@github.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import java
|
||||
|
||||
/** An Android Fragment. */
|
||||
/** The class `android.app.Fragment`. */
|
||||
class AndroidFragment extends Class {
|
||||
AndroidFragment() { this.getASupertype*().hasQualifiedName("android.app", "Fragment") }
|
||||
}
|
||||
|
||||
@@ -28,10 +28,12 @@ class OnActivityResultIncomingIntent extends DataFlow::Node {
|
||||
* Intent to `onActivityResult`.
|
||||
*/
|
||||
predicate isRemoteSource() {
|
||||
exists(ImplicitStartActivityForResultConf conf, RefType startingType, DataFlow::Node sink |
|
||||
conf.hasFlowTo(sink) and
|
||||
startingType = sink.asExpr().(Argument).getCall().getEnclosingCallable().getDeclaringType()
|
||||
exists(ImplicitStartActivityForResultConf conf, RefType startingType, Expr startActivityForResultArg |
|
||||
conf.hasFlowToExpr(startActivityForResultArg) and
|
||||
// startingType is the class enclosing the method that calls `startActivityForResult`.
|
||||
startingType = startActivityForResultArg.getEnclosingCallable().getDeclaringType()
|
||||
|
|
||||
// startingType itself defines an `onActivityResult` method:
|
||||
startingType = this.getEnclosingCallable().getDeclaringType()
|
||||
or
|
||||
// A fragment calls `startActivityForResult`
|
||||
|
||||
Reference in New Issue
Block a user