CarZone

@CarProtocol
@RequiresCarApi(value = 5)
@ExperimentalCarApi
public final class CarZone


Allows specification of a car zone using rows and columns. For example, CarZone.Driver allows modification of Driver's seat controls without knowing whether it is a left side driving car or right side driving car. This class is different from CarOccupantZoneManager in that CarZone is specifically for AndroidX APIs' implementation to control car features such as temperature based on zones while CarOccupantZoneManager class provides APIs to get displays and users information.

getCarZones returns a list of these CarZones. It indicates the CarValue happens in those CarValues of the vehicle.

Summary

Nested types

public final class CarZone.Builder

A builder for instantiating CarZone.

Constants

static final int

Refers to all the columns in the vehicle.

static final int

Refers to the center column of the vehicle only.

static final int

Refers to either CAR_ZONE_COLUMN_LEFT or CAR_ZONE_COLUMN_RIGHT, depending on the vehicle configuration.

static final int

Refers to the left-most column of the vehicle only.

static final int

Refers to either CAR_ZONE_COLUMN_LEFT or CAR_ZONE_COLUMN_RIGHT, depending on the vehicle configuration.

static final int

Refers to the right-most column of the vehicle only.

static final CarZone

Refers to the global zone, represented by CAR_ZONE_ROW_ALL, CAR_ZONE_COLUMN_ALL.

static final int

Refers to all the rows in the vehicle.

static final int

Refers to the all rows, except for CAR_ZONE_ROW_FIRST of the vehicle.

static final int

Refers to the front row of the vehicle only.

static final int

Refers to the second row of the vehicle only.

static final int

Refers to the third row of the vehicle only.

Public methods

boolean
int

Returns one of the values in CarZoneColumn.

int

Returns one of the values in CarZoneRow.

int
@NonNull String

Constants

CAR_ZONE_COLUMN_ALL

Added in 1.3.0
public static final int CAR_ZONE_COLUMN_ALL = 16

Refers to all the columns in the vehicle.

CAR_ZONE_COLUMN_CENTER

Added in 1.3.0
public static final int CAR_ZONE_COLUMN_CENTER = 48

Refers to the center column of the vehicle only.

CAR_ZONE_COLUMN_DRIVER

Added in 1.3.0
public static final int CAR_ZONE_COLUMN_DRIVER = 80

Refers to either CAR_ZONE_COLUMN_LEFT or CAR_ZONE_COLUMN_RIGHT, depending on the vehicle configuration.

CAR_ZONE_COLUMN_LEFT

Added in 1.3.0
public static final int CAR_ZONE_COLUMN_LEFT = 32

Refers to the left-most column of the vehicle only.

CAR_ZONE_COLUMN_PASSENGER

Added in 1.3.0
public static final int CAR_ZONE_COLUMN_PASSENGER = 96

Refers to either CAR_ZONE_COLUMN_LEFT or CAR_ZONE_COLUMN_RIGHT, depending on the vehicle configuration.

CAR_ZONE_COLUMN_RIGHT

Added in 1.3.0
public static final int CAR_ZONE_COLUMN_RIGHT = 64

Refers to the right-most column of the vehicle only.

CAR_ZONE_GLOBAL

Added in 1.3.0
public static final CarZone CAR_ZONE_GLOBAL

Refers to the global zone, represented by CAR_ZONE_ROW_ALL, CAR_ZONE_COLUMN_ALL.

CAR_ZONE_ROW_ALL

Added in 1.3.0
public static final int CAR_ZONE_ROW_ALL = 0

Refers to all the rows in the vehicle.

CAR_ZONE_ROW_EXCLUDE_FIRST

Added in 1.3.0
public static final int CAR_ZONE_ROW_EXCLUDE_FIRST = 4

Refers to the all rows, except for CAR_ZONE_ROW_FIRST of the vehicle.

CAR_ZONE_ROW_FIRST

Added in 1.3.0
public static final int CAR_ZONE_ROW_FIRST = 1

Refers to the front row of the vehicle only.

CAR_ZONE_ROW_SECOND

Added in 1.3.0
public static final int CAR_ZONE_ROW_SECOND = 2

Refers to the second row of the vehicle only.

CAR_ZONE_ROW_THIRD

Added in 1.3.0
public static final int CAR_ZONE_ROW_THIRD = 3

Refers to the third row of the vehicle only.

Public methods

equals

Added in 1.4.0-rc02
public boolean equals(@Nullable Object object)

getColumn

Added in 1.3.0
public int getColumn()

Returns one of the values in CarZoneColumn.

getRow

Added in 1.3.0
public int getRow()

Returns one of the values in CarZoneRow.

hashCode

Added in 1.4.0-rc02
public int hashCode()

toString

Added in 1.4.0-rc02
public @NonNull String toString()