@Implements(value=android.content.ContextWrapper.class) public class ShadowContextWrapper extends java.lang.Object
Constructor and Description |
---|
ShadowContextWrapper() |
Modifier and Type | Method and Description |
---|---|
void |
clearStartedServices()
Delegates to the application to clear the stack of started service intents.
|
void |
denyPermissions(java.lang.String... permissionNames) |
java.util.List<android.content.Intent> |
getBroadcastIntents() |
android.content.Intent |
getNextStartedActivity()
Consumes the most recent
Intent started by #startActivity(android.content.Intent) and returns it. |
android.content.Intent |
getNextStartedService()
Delegates to the application to consume and return the next
Intent on the started services stack. |
android.content.Intent |
getNextStoppedService()
Delegates to the application to return the next
Intent to stop a service (irrespective of if the service was running) |
void |
grantPermissions(java.lang.String... permissionNames) |
android.content.Intent |
peekNextStartedActivity()
Returns the most recent
Intent started by #startActivity(android.content.Intent) without consuming it. |
android.content.Intent |
peekNextStartedService()
Return (without consuming) the next
Intent on the started services stack. |
public java.util.List<android.content.Intent> getBroadcastIntents()
public android.content.Intent getNextStartedActivity()
Consumes the most recent Intent
started by #startActivity(android.content.Intent)
and returns it.
Intent
public android.content.Intent peekNextStartedActivity()
Returns the most recent Intent
started by #startActivity(android.content.Intent)
without consuming it.
Intent
public android.content.Intent getNextStartedService()
Delegates to the application to consume and return the next Intent
on the started services stack.
Intent
for a servicepublic void clearStartedServices()
Delegates to the application to clear the stack of started service intents.
public android.content.Intent peekNextStartedService()
Return (without consuming) the next Intent
on the started services stack.
Intent
for a servicepublic android.content.Intent getNextStoppedService()
Delegates to the application to return the next Intent
to stop a service (irrespective of if the service was running)
Intent
for the next service requested to be stoppedpublic void grantPermissions(java.lang.String... permissionNames)
public void denyPermissions(java.lang.String... permissionNames)