public final class

CarUxRestrictions.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.car.uxrestrictions.CarUxRestrictions.Builder

Overview

Builder class for CarUxRestrictions

Summary

Constructors
publicBuilder(boolean requiresDistractionOptimization, int activeRestrictions, long timestamp)

Methods
public CarUxRestrictionsbuild()

Build and return the CarUxRestrictions object

public CarUxRestrictions.BuildersetMaxContentDepth(int maxContentDepth)

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

public CarUxRestrictions.BuildersetMaxCumulativeContentItems(int maxCumulativeContentItems)

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

public CarUxRestrictions.BuildersetMaxStringLength(int maxStringLength)

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

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(boolean requiresDistractionOptimization, int activeRestrictions, long timestamp)

Methods

public CarUxRestrictions.Builder setMaxStringLength(int maxStringLength)

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

public CarUxRestrictions.Builder setMaxCumulativeContentItems(int maxCumulativeContentItems)

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

public CarUxRestrictions.Builder setMaxContentDepth(int maxContentDepth)

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

public CarUxRestrictions build()

Build and return the CarUxRestrictions object