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:

Summary

Public methods

CarAppServiceController create(Intent intent)

Initializes the CarAppService that is being controlled.

CarAppServiceController create()

Initializes the CarAppService that is being controlled.

CarAppServiceController destroy()

Destroys the CarAppService that is being controlled.

CarAppService get()

Retrieves the CarAppService that is being controlled.

CarAppServiceController newIntent(Intent intent)

Sends the provided Intent to the CarAppService that is being controlled.

static CarAppServiceController of(TestCarContext testCarContext, CarAppService carAppService)

Creates a CarAppServiceController to control the provided CarAppService.

CarAppServiceController pause()

Pauses the CarAppService that is being controlled.

CarAppServiceController resume()

Resumes the CarAppService that is being controlled.

void setHostInfo(HostInfo hostInfo)
CarAppServiceController start()

Starts the CarAppService that is being controlled.

CarAppServiceController stop()

Stops the CarAppService that is being controlled.

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

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

resume

public CarAppServiceController resume ()

Resumes the CarAppService that is being controlled.

Returns
CarAppServiceController

setHostInfo

public void setHostInfo (HostInfo hostInfo)

Parameters
hostInfo HostInfo

start

public CarAppServiceController start ()

Starts the CarAppService that is being controlled.

Returns
CarAppServiceController

stop

public CarAppServiceController stop ()

Stops the CarAppService that is being controlled.

Returns
CarAppServiceController