[infer] add the Fragment from the androidx package to the hard copied lists

Reviewed By: ngorogiannis

Differential Revision: D14983576

fbshipit-source-id: 3e6dba88d
master
Jeremy Dubreil 6 years ago committed by Facebook Github Bot
parent 4a91616390
commit 8201bc1c4e

@ -246,6 +246,7 @@ let initializer_classes =
; "android.app.Fragment"
; "android.app.Service"
; "android.support.v4.app.Fragment"
; "androidx.fragment.app.Fragment"
; "junit.framework.TestCase" ]

@ -346,6 +346,7 @@ let ui_matcher_records =
(* search_superclasses is true by default in how [default] is treated *)
[ {default with classname= "android.support.v4.app.Fragment"; methods= fragment_methods}
; {default with classname= "android.app.Fragment"; methods= fragment_methods}
; {default with classname= "androidx.fragment.app.Fragment"; methods= fragment_methods}
; {default with classname= "android.content.ContentProvider"; methods= ["onCreate"]}
; {default with classname= "android.content.BroadcastReceiver"; methods= ["onReceive"]}
; { default with

@ -191,7 +191,10 @@ module SourceKind = struct
let method_name = Typ.Procname.Java.get_method java_pname in
let taint_matching_supertype typename =
match (Typ.Name.name typename, method_name) with
| ( ("android.app.Activity" | "android.app.Fragment" | "android.support.v4.app.Fragment")
| ( ( "android.app.Activity"
| "android.app.Fragment"
| "android.support.v4.app.Fragment"
| "androidx.fragment.app.Fragment" )
, ("onActivityResult" | "onNewIntent") ) ->
Some (taint_formals_with_types ["android.content.Intent"] Intent formals)
| ( "android.app.Service"
@ -391,19 +394,22 @@ module SinkKind = struct
taint_nth 1 [StartComponent]
| ( ( "android.app.Activity"
| "android.content.Context"
| "android.support.v4.app.Fragment" )
| "android.support.v4.app.Fragment"
| "androidx.fragment.app.Fragment" )
, "startIntentSenderForResult" ) ->
taint_nth 2 [StartComponent]
| "android.app.Activity", "startIntentSenderFromChild" ->
taint_nth 3 [StartComponent]
| ( ( "android.app.Fragment"
| "android.content.Context"
| "android.support.v4.app.Fragment" )
| "android.support.v4.app.Fragment"
| "androidx.fragment.app.Fragment" )
, "startActivity" ) ->
taint_nth 0 [StartComponent; StartComponentForInsecureIntentHandling]
| ( ( "android.app.Fragment"
| "android.content.Context"
| "android.support.v4.app.Fragment" )
| "android.support.v4.app.Fragment"
| "androidx.fragment.app.Fragment" )
, ( "bindService"
| "sendBroadcast"
| "sendBroadcastAsUser"

Loading…
Cancel
Save