Package com.ibm.wala.dalvik.util
Class AndroidPreFlightChecks
- java.lang.Object
-
- com.ibm.wala.dalvik.util.AndroidPreFlightChecks
-
public class AndroidPreFlightChecks extends Object
Does optional checks before building the CallGraph. The android-model expects some configuration to be of specific settings to unfold it's full performance. These checks may be run before building the CallGraph to verify everything is in place.- Since:
- 2013-11-01
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AndroidPreFlightChecks.Test
-
Constructor Summary
Constructors Constructor Description AndroidPreFlightChecks(AndroidEntryPointManager manager, AnalysisOptions options, IClassHierarchy cha)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
all()
Perform all checks defined in this class.boolean
allBut(Set<AndroidPreFlightChecks.Test> skip)
Perform all checks defined in this class but the listed ones.boolean
checkAllComponentsReuse()
In order to for the startComponent-calls to work components should be set reuse.boolean
checkIntentSpecs()
Is enough info present to resolve Intents.boolean
checkNoObjectInEntryPoints()
Check if an Entrypoint takes an object.boolean
checkOverridesInPlace()
The Overrides are needed to resolve intents in the startComponent-Calls.boolean
checkStubsVersion()
Checks whether stubs are recent enough to contain some used functions.
-
-
-
Constructor Detail
-
AndroidPreFlightChecks
public AndroidPreFlightChecks(AndroidEntryPointManager manager, AnalysisOptions options, IClassHierarchy cha)
-
-
Method Detail
-
all
public boolean all()
Perform all checks defined in this class.- Returns:
- if the checks passed
-
allBut
public boolean allBut(Set<AndroidPreFlightChecks.Test> skip)
Perform all checks defined in this class but the listed ones.- Parameters:
skip
- checks not to perform- Returns:
- if the checks passed
-
checkOverridesInPlace
public boolean checkOverridesInPlace()
The Overrides are needed to resolve intents in the startComponent-Calls. Without these overrides the startComponent-Calls will not be overridden. In a static analysis there won't be a way to resolve the actual target of the call.- Returns:
- if check passed
- See Also:
IntentContextInterpreter
,IntentContextSelector
,Overrides.StartComponentMethodTargetSelector
-
checkStubsVersion
public boolean checkStubsVersion()
Checks whether stubs are recent enough to contain some used functions. If the stubs are to old some parts that rely on these functions may be skipped entirely.- Returns:
- if check passed
-
checkIntentSpecs
public boolean checkIntentSpecs()
Is enough info present to resolve Intents. This information is needed by the startComponent-functions in order to resolve the target of the call (if enough context is present). If this information is unavailable the call will be resolved to the function AndroidModel.Class.startUNKNOWNComponent which will call all Components of the specific type (Activity, Service, ..) present in the application.- Returns:
- if check passed
-
checkAllComponentsReuse
public boolean checkAllComponentsReuse()
In order to for the startComponent-calls to work components should be set reuse. If components are _not_ set reuse the following will happen: * The caller context can not be set * No result will be transmitted back to onActivityResult- Returns:
- if the test passed
-
checkNoObjectInEntryPoints
public boolean checkNoObjectInEntryPoints()
Check if an Entrypoint takes an object.
-
-