VehicleDrivingStateResourceRule

class VehicleDrivingStateResourceRule : ResourceRule

This rule can be used to simulate the driving state.

Note: This rule is using the CarDrivingStateManager.injectDrivingState API to simulate the driving state and requires the android.car library to be available on the platform.

Throws

if android.car library is not available.

Constructors

Link copied to clipboard
fun VehicleDrivingStateResourceRule()

Functions

Link copied to clipboard
fun drive()

Simulates the CarDrivingStateEvent.DRIVING_STATE_MOVING state.

Link copied to clipboard
fun park()

Simulates the CarDrivingStateEvent.DRIVING_STATE_PARKED state.

Inherited functions

Link copied to clipboard
open override fun apply(baseStatement: Statement, description: Description): Statement