CarVersion

public final class CarVersion
extends ApiVersion<CarVersion> implements Parcelable

java.lang.Object
   ↳ android.car.ApiVersion<android.car.CarVersion>
     ↳ android.car.CarVersion


Represents the API version of the Car SDK.

Summary

Nested classes

class CarVersion.VERSION_CODES

Contains pre-defined versions matching Car releases. 

Inherited constants

Fields

public static final Creator<CarVersion> CREATOR

Public methods

int describeContents()
static CarVersion forMajorAndMinorVersions(int majorVersion, int minorVersion)

Creates a new instance with the given major and minor versions.

static CarVersion forMajorVersion(int majorVersion)

Creates a new instance for a major version (i.e., the minor version will be 0.

void writeToParcel(Parcel dest, int flags)

Inherited methods

Fields

CREATOR

Added in API level 33
public static final Creator<CarVersion> CREATOR

Public methods

describeContents

Added in API level 33
public int describeContents ()

Returns
int

forMajorAndMinorVersions

Added in API level 33
public static CarVersion forMajorAndMinorVersions (int majorVersion, 
                int minorVersion)

Creates a new instance with the given major and minor versions.

Parameters
majorVersion int

minorVersion int

Returns
CarVersion

forMajorVersion

Added in API level 33
public static CarVersion forMajorVersion (int majorVersion)

Creates a new instance for a major version (i.e., the minor version will be 0.

Parameters
majorVersion int

Returns
CarVersion

writeToParcel

Added in API level 33
public void writeToParcel (Parcel dest, 
                int flags)

Parameters
dest Parcel

flags int