PlatformVersion

public final class PlatformVersion
extends ApiVersion<PlatformVersion> implements Parcelable

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


Represents the API version of the standard Android SDK.

Summary

Nested classes

class PlatformVersion.VERSION_CODES

Contains pre-defined versions matching Car releases. 

Inherited constants

int CONTENTS_FILE_DESCRIPTOR

int PARCELABLE_ELIDE_DUPLICATES

int PARCELABLE_STABILITY_LOCAL

int PARCELABLE_STABILITY_VINTF

int PARCELABLE_WRITE_RETURN_VALUE

Fields

public static final Creator<PlatformVersion> CREATOR

Public methods

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

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

static PlatformVersion 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

final int getMajorVersion()

Gets the major version of the API represented by this object.

final int getMinorVersion()

Gets the minor version change of API for the same getMajorVersion().

final boolean isAtLeast(PlatformVersion requiredVersion)

Checks if this API version meets the required version.

Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait(long arg0, int arg1)
final void wait(long arg0)
final void wait()
abstract int describeContents()
default int getStability()
abstract void writeToParcel(Parcel arg0, int arg1)

Fields

CREATOR

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

Public methods

describeContents

Added in API level 33
public int describeContents ()

Returns
int

forMajorAndMinorVersions

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

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

Parameters
majorVersion int

minorVersion int

Returns
PlatformVersion

forMajorVersion

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

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

Parameters
majorVersion int

Returns
PlatformVersion

writeToParcel

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

Parameters
dest Parcel

flags int