Class AndroidStartComponentTool

java.lang.Object
com.ibm.wala.dalvik.ipa.callgraph.androidModel.stubs.AndroidStartComponentTool

public class AndroidStartComponentTool extends Object
Grab and set data of AndroidClasses.

This class is only used by AndroidModel.getMethodAs() as it got a bit lengthy.

Since:
2013-10-22
  • Constructor Summary

    Constructors
    Constructor
    Description
    AndroidStartComponentTool(com.ibm.wala.ipa.cha.IClassHierarchy cha, com.ibm.wala.types.MethodReference asMethod, Set<IntentStarters.StarterFlags> flags, com.ibm.wala.types.TypeReference caller, com.ibm.wala.core.util.ssa.TypeSafeInstructionFactory instructionFactory, com.ibm.wala.core.util.ssa.ParameterAccessor acc, com.ibm.wala.core.util.ssa.SSAValueManager pm, com.ibm.wala.ipa.summaries.VolatileMethodSummary redirect, com.ibm.wala.core.util.ssa.ParameterAccessor.Parameter self, IntentStarters.StartInfo info)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.ibm.wala.core.util.ssa.SSAValue
    addPhi(List<? extends com.ibm.wala.core.util.ssa.SSAValue> from)
    Add Phi (if necessary) - not if only one from.
    void
    assignIBinder(com.ibm.wala.core.util.ssa.SSAValue iBinder, List<? extends com.ibm.wala.core.util.ssa.SSAValue> allActivities)
    Set the iBinder in the callee.
    void
    attachActivities(Set<? extends com.ibm.wala.core.util.ssa.SSAValue> activities, com.ibm.wala.core.util.ssa.SSAValue application, com.ibm.wala.core.util.ssa.SSAValue thread, com.ibm.wala.core.util.ssa.SSAValue context, com.ibm.wala.core.util.ssa.SSAValue iBinderToken, com.ibm.wala.core.util.ssa.SSAValue intent)
     
    com.ibm.wala.core.util.ssa.SSAValue
    Fetches the context of the caller.
    com.ibm.wala.core.util.ssa.SSAValue
    fetchIBinder(com.ibm.wala.core.util.ssa.SSAValue androidContext)
    Fetch the permissions to start the component with.
    void
    fetchResults(List<? super com.ibm.wala.core.util.ssa.SSAValue> resultCodes, List<? super com.ibm.wala.core.util.ssa.SSAValue> resultData, List<? extends com.ibm.wala.core.util.ssa.SSAValue> allActivities)
    Grab mResultCode and mResultData.
    void
    setIntent(com.ibm.wala.core.util.ssa.SSAValue intent, List<? extends com.ibm.wala.core.util.ssa.SSAValue> allActivities)
    Call Activity.setIntent.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AndroidStartComponentTool

      public AndroidStartComponentTool(com.ibm.wala.ipa.cha.IClassHierarchy cha, com.ibm.wala.types.MethodReference asMethod, Set<IntentStarters.StarterFlags> flags, com.ibm.wala.types.TypeReference caller, com.ibm.wala.core.util.ssa.TypeSafeInstructionFactory instructionFactory, com.ibm.wala.core.util.ssa.ParameterAccessor acc, com.ibm.wala.core.util.ssa.SSAValueManager pm, com.ibm.wala.ipa.summaries.VolatileMethodSummary redirect, com.ibm.wala.core.util.ssa.ParameterAccessor.Parameter self, IntentStarters.StartInfo info)
  • Method Details

    • attachActivities

      public void attachActivities(Set<? extends com.ibm.wala.core.util.ssa.SSAValue> activities, com.ibm.wala.core.util.ssa.SSAValue application, com.ibm.wala.core.util.ssa.SSAValue thread, com.ibm.wala.core.util.ssa.SSAValue context, com.ibm.wala.core.util.ssa.SSAValue iBinderToken, com.ibm.wala.core.util.ssa.SSAValue intent)
    • typeOfCallerContext

      public AndroidTypes.AndroidContextType typeOfCallerContext()
    • fetchCallerContext

      public com.ibm.wala.core.util.ssa.SSAValue fetchCallerContext()
      Fetches the context of the caller.
      Returns:
      A new SSAValue representing the androidContext (may be null!). // XXX
    • fetchIBinder

      public com.ibm.wala.core.util.ssa.SSAValue fetchIBinder(com.ibm.wala.core.util.ssa.SSAValue androidContext)
      Fetch the permissions to start the component with.

      Fetching depends on StarterFlags.QUENCH_PERMISSIONS, XXX

      Returns:
      an iBinder
      Throws:
      UnsupportedOperationException - when fetching is not supported with the current settings
    • assignIBinder

      public void assignIBinder(com.ibm.wala.core.util.ssa.SSAValue iBinder, List<? extends com.ibm.wala.core.util.ssa.SSAValue> allActivities)
      Set the iBinder in the callee.
    • setIntent

      public void setIntent(com.ibm.wala.core.util.ssa.SSAValue intent, List<? extends com.ibm.wala.core.util.ssa.SSAValue> allActivities)
      Call Activity.setIntent.
    • fetchResults

      public void fetchResults(List<? super com.ibm.wala.core.util.ssa.SSAValue> resultCodes, List<? super com.ibm.wala.core.util.ssa.SSAValue> resultData, List<? extends com.ibm.wala.core.util.ssa.SSAValue> allActivities)
      Grab mResultCode and mResultData.

      This data is used to call onActivityResult of the caller.

    • addPhi

      public com.ibm.wala.core.util.ssa.SSAValue addPhi(List<? extends com.ibm.wala.core.util.ssa.SSAValue> from)
      Add Phi (if necessary) - not if only one from.