lightbulb_outline Please take our October 2018 developer survey. Start survey

CarUxRestrictionsManager

public final class CarUxRestrictionsManager
extends Object

java.lang.Object
   ↳ android.car.drivingstate.CarUxRestrictionsManager


API to register and get the User Experience restrictions imposed based on the car's driving state.

Summary

Nested classes

interface CarUxRestrictionsManager.OnUxRestrictionsChangedListener

Listener Interface for clients to implement to get updated on driving state related changes. 

Public methods

CarUxRestrictions getCurrentCarUxRestrictions()

Get the current UX restrictions CarUxRestrictions in place.

void registerListener(CarUxRestrictionsManager.OnUxRestrictionsChangedListener listener)

Register a CarUxRestrictionsManager.OnUxRestrictionsChangedListener for listening to changes in the UX Restrictions to adhere to.

void unregisterListener()

Unregister the registered CarUxRestrictionsManager.OnUxRestrictionsChangedListener

Inherited methods

Public methods

getCurrentCarUxRestrictions

public CarUxRestrictions getCurrentCarUxRestrictions ()

Get the current UX restrictions CarUxRestrictions in place.

Returns
CarUxRestrictions current UX restrictions that is in effect.

Throws
CarNotConnectedException

registerListener

public void registerListener (CarUxRestrictionsManager.OnUxRestrictionsChangedListener listener)

Register a CarUxRestrictionsManager.OnUxRestrictionsChangedListener for listening to changes in the UX Restrictions to adhere to.

If a listener has already been registered, it has to be unregistered before registering the new one.

Parameters
listener CarUxRestrictionsManager.OnUxRestrictionsChangedListener: CarUxRestrictionsManager.OnUxRestrictionsChangedListener

Throws
CarNotConnectedException
IllegalArgumentException

unregisterListener

public void unregisterListener ()

Unregister the registered CarUxRestrictionsManager.OnUxRestrictionsChangedListener

Throws
CarNotConnectedException