CarAppServiceController
public
class
CarAppServiceController
extends Object
java.lang.Object | |
↳ | com.google.android.libraries.car.app.testing.CarAppServiceController |
A controller that allows testing of a CarAppService
.
This contoller allows:
- Sending different
Intent
s to theCarAppService
'sCarAppService.onCreateScreen(Intent)
andCarAppService.onNewIntent(Intent)
methods. - Moving a
CarAppService
through its differentLifecycle.State
s.
Summary
Public methods | |
---|---|
CarAppServiceController
|
create(Intent intent)
Initializes the |
CarAppServiceController
|
create()
Initializes the |
CarAppServiceController
|
destroy()
Destroys the |
CarAppService
|
get()
Retrieves the |
CarAppServiceController
|
newIntent(Intent intent)
Sends the provided |
static
CarAppServiceController
|
of(TestCarContext testCarContext, CarAppService carAppService)
Creates a |
CarAppServiceController
|
pause()
Pauses the |
CarAppServiceController
|
resume()
Resumes the |
void
|
setHostInfo(HostInfo hostInfo)
|
CarAppServiceController
|
start()
Starts the |
CarAppServiceController
|
stop()
Stops the |
Inherited methods | |
---|---|
Public methods
create
public CarAppServiceController create (Intent intent)
Initializes the CarAppService
that is being controlled.
This will send the provided Intent
to CarAppService.onCreateScreen(Intent)
.
Parameters | |
---|---|
intent |
Intent |
Returns | |
---|---|
CarAppServiceController |
create
public CarAppServiceController create ()
Initializes the CarAppService
that is being controlled.
This will send an empty Intent
to CarAppService.onCreateScreen(Intent)
.
Returns | |
---|---|
CarAppServiceController |
destroy
public CarAppServiceController destroy ()
Destroys the CarAppService
that is being controlled.
Returns | |
---|---|
CarAppServiceController |
See also:
get
public CarAppService get ()
Retrieves the CarAppService
that is being controlled.
Returns | |
---|---|
CarAppService |
newIntent
public CarAppServiceController newIntent (Intent intent)
Sends the provided Intent
to the CarAppService
that is being controlled.
Parameters | |
---|---|
intent |
Intent |
Returns | |
---|---|
CarAppServiceController |
of
public static CarAppServiceController of (TestCarContext testCarContext, CarAppService carAppService)
Creates a CarAppServiceController
to control the provided CarAppService
.
Parameters | |
---|---|
testCarContext |
TestCarContext |
carAppService |
CarAppService |
Returns | |
---|---|
CarAppServiceController |
pause
public CarAppServiceController pause ()
Pauses the CarAppService
that is being controlled.
Returns | |
---|---|
CarAppServiceController |
See also:
resume
public CarAppServiceController resume ()
Resumes the CarAppService
that is being controlled.
Returns | |
---|---|
CarAppServiceController |
See also:
start
public CarAppServiceController start ()
Starts the CarAppService
that is being controlled.
Returns | |
---|---|
CarAppServiceController |
See also:
stop
public CarAppServiceController stop ()
Stops the CarAppService
that is being controlled.
Returns | |
---|---|
CarAppServiceController |
See also: