Class LoopKillAndroidModel
This variant adds a nother loop to the LoopAndroidModel. This additional loop emulates the start of an Application with a savedIstanceState:
When memory on a device gets short Apps may be removed from memory. When they are needed again they get started using that savedIstanceState.
- Author:
- Tobias Blaschke <code@tobiasblaschke.de>
- See Also:
-
Field Summary
Fields inherited from class AbstractAndroidModel
body, entryPoints, insts, paramManager -
Constructor Summary
ConstructorsConstructorDescriptionLoopKillAndroidModel(VolatileMethodSummary body, TypeSafeInstructionFactory insts, SSAValueManager paramManager, Iterable<? extends Entrypoint> entryPoints) -
Method Summary
Modifier and TypeMethodDescriptionprotected intenterAT_FIRST(int PC) Loop starts here.protected intleaveAT_LAST(int PC) Loops to AT_FIRST.Methods inherited from class LoopAndroidModel
enterAFTER_LOOP, enterSTART_OF_LOOPMethods inherited from class SingleStartAndroidModel
enterEND_OF_LOOP, enterMULTIPLE_TIMES_IN_LOOPMethods inherited from class AbstractAndroidModel
enter, enterAT_LAST, enterBEFORE_LOOP, enterMIDDLE_OF_LOOP, finish, hadSectionSwitch, returnTypesBetween
-
Constructor Details
-
LoopKillAndroidModel
public LoopKillAndroidModel(VolatileMethodSummary body, TypeSafeInstructionFactory insts, SSAValueManager paramManager, Iterable<? extends Entrypoint> entryPoints) - Parameters:
body- The MethodSummary to add instructions toinsts- Will be used to generate the instructions
-
-
Method Details
-
enterAT_FIRST
protected int enterAT_FIRST(int PC) Loop starts here.Gets called when Label ExecutionOrder.AT_FIRST got stepped over.
In most cases you don't want to invoke this function directly but to use
enter(ExecutionOrder.AT_FIRST, int)instead.Side effects: currentSection is updated, instructions are inserted into the body
- Overrides:
enterAT_FIRSTin classAbstractAndroidModel- Parameters:
PC- Program Counter instructions shall be placed at. In most cases you'll simply pass body.getNextProgramCounter()- Returns:
- Program Counter after insertion of the code
-
leaveAT_LAST
protected int leaveAT_LAST(int PC) Loops to AT_FIRST.It inserts a gotoInstruction and fills the space reserved before with actual PhiInstructions
Does not insert any special handling.
Gets called when the model gets finished.
In most cases you don't want to invoke this function directly but to use
AbstractAndroidModel.finish(int)insteadSide effects: instructions are inserted into the body
- Overrides:
leaveAT_LASTin classLoopAndroidModel- Parameters:
PC- Program Counter instructions shall be placed at. In most cases you'll simply pass body.getNextProgramCounter()- Returns:
- Program Counter after insertion of the code
-