public final class

DefaultInterceptingActivityFactory

extends Object
implements InterceptingActivityFactory
java.lang.Object
   ↳ android.support.test.internal.runner.intercepting.DefaultInterceptingActivityFactory

Class Overview

Default implementation of InterceptingActivityFactory which does not intercept activity creation in newActivity(ClassLoader, String, Intent)

Summary

Public Constructors
DefaultInterceptingActivityFactory()
Public Methods
Activity create(ClassLoader classLoader, String className, Intent intent)
This method can be used to provide activity instance while intercepting activity creation for a particular activity in response to a given intent.
boolean shouldIntercept(ClassLoader classLoader, String className, Intent intent)
This method can be used to know whether activity instance creation should be intercepted or not for a particular activity in response to a given intent.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.support.test.runner.intercepting.InterceptingActivityFactory

Public Constructors

public DefaultInterceptingActivityFactory ()

Public Methods

public Activity create (ClassLoader classLoader, String className, Intent intent)

This method can be used to provide activity instance while intercepting activity creation for a particular activity in response to a given intent.

Parameters
classLoader The ClassLoader with which to instantiate the object
className The name of the class implementing the Activity object
intent The Intent object that specified the activity class being instantiated.
Returns
  • The newly instantiated Activity object.

public boolean shouldIntercept (ClassLoader classLoader, String className, Intent intent)

This method can be used to know whether activity instance creation should be intercepted or not for a particular activity in response to a given intent.

Parameters
classLoader The ClassLoader with which to instantiate the object
className The name of the class implementing the Activity object
intent The Intent object that specified the activity class being instantiated.
Returns
  • true if activity with className should be intercepted, otherwise false.