File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
soot-infoflow-android/src/soot/jimple/infoflow/android/entryPointCreators Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -291,17 +291,16 @@ protected SootMethod createDummyMainInternal() {
291291 applicationClassUse = applicationClass ;
292292 }
293293 localVarsForClasses .put (applicationClass , applicationLocal );
294+ SootClass cw = Scene .v ().getSootClassUnsafe (AndroidEntryPointConstants .CONTEXT_WRAPPER );
295+ if (cw == null ) {
296+ //use application local type as a fallback, since this class also implements context wrapper
297+ cw = ((RefType ) applicationLocal .getType ()).getSootClass ();
298+ }
299+ if (cw != null )
300+ body .getUnits ().add (j .newInvokeStmt (j .newVirtualInvokeExpr (applicationLocal ,
301+ Scene .v ().makeMethodRef (cw , AndroidEntryPointConstants .ATTACH_BASE_CONTEXT , false ))));
294302 }
295303
296- SootClass cw = Scene .v ().getSootClassUnsafe (AndroidEntryPointConstants .CONTEXT_WRAPPER );
297- if (cw == null ) {
298- //use application local type as a fallback, since this class also implements context wrapper
299- cw = ((RefType ) applicationLocal .getType ()).getSootClass ();
300- }
301- if (cw != null )
302- body .getUnits ().add (j .newInvokeStmt (j .newVirtualInvokeExpr (applicationLocal ,
303- Scene .v ().makeMethodRef (cw , AndroidEntryPointConstants .ATTACH_BASE_CONTEXT , false ))));
304-
305304 Map <SootClass , ContentProviderEntryPointCreator > cpComponents = new HashMap <>();
306305 // For some weird reason unknown to anyone except the flying spaghetti
307306 // monster, the onCreate() methods of content providers run even before
You can’t perform that action at this time.
0 commit comments