CarUxRestrictions.Builder

public static class CarUxRestrictions.Builder
extends Object

java.lang.Object
   ↳ android.car.drivingstate.CarUxRestrictions.Builder


Builder class for CarUxRestrictions

Summary

Public constructors

Builder(boolean reqOpt, int restrictions, long time)

Public methods

CarUxRestrictions build()

Build and return the CarUxRestrictions object

CarUxRestrictions.Builder setMaxContentDepth(int depth)

Set the maximum number of levels that the user can navigate to when CarUxRestrictions#UX_RESTRICTIONS_LIMIT_CONTENT is imposed.

CarUxRestrictions.Builder setMaxCumulativeContentItems(int number)

Set the maximum number of cumulative content items that can be displayed when CarUxRestrictions#UX_RESTRICTIONS_LIMIT_CONTENT is imposed.

CarUxRestrictions.Builder setMaxStringLength(int length)

Set the maximum length of general purpose strings that can be displayed when CarUxRestrictions#UX_RESTRICTIONS_LIMIT_STRING_LENGTH is imposed.

Inherited methods

Public constructors

Public methods

build

Added in API level 29
public CarUxRestrictions build ()

Build and return the CarUxRestrictions object

Returns
CarUxRestrictions

setMaxContentDepth

Added in API level 29
public CarUxRestrictions.Builder setMaxContentDepth (int depth)

Set the maximum number of levels that the user can navigate to when CarUxRestrictions#UX_RESTRICTIONS_LIMIT_CONTENT is imposed.

Parameters
depth int

Returns
CarUxRestrictions.Builder

setMaxCumulativeContentItems

Added in API level 29
public CarUxRestrictions.Builder setMaxCumulativeContentItems (int number)

Set the maximum number of cumulative content items that can be displayed when CarUxRestrictions#UX_RESTRICTIONS_LIMIT_CONTENT is imposed.

Parameters
number int

Returns
CarUxRestrictions.Builder

setMaxStringLength

Added in API level 29
public CarUxRestrictions.Builder setMaxStringLength (int length)

Set the maximum length of general purpose strings that can be displayed when CarUxRestrictions#UX_RESTRICTIONS_LIMIT_STRING_LENGTH is imposed.

Parameters
length int

Returns
CarUxRestrictions.Builder