SessionInfo


@RequiresCarApi(value = 6)
@CarProtocol
public class SessionInfo


Information about a Session, such as the physical display and the session ID.

Summary

Constants

static final @NonNull SessionInfo

A default SessionInfo for the main display, used when the host is on a version that doesn't support this new class.

static final int

The cluster display, usually located behind the steering wheel.

static final int

The primary infotainment display usually in the center column of the vehicle.

Public constructors

SessionInfo(int displayType, @NonNull String sessionId)

Creates a new SessionInfo with the provided displayType and sessionId.

Public methods

boolean
int

Returns the type of display that the Session is rendering on.

@NonNull String

Returns a session-stable ID, unique to the display that the Session is rendering on.

@Nullable Set<Class<Template>>
getSupportedTemplates(int carAppApiLevel)

Returns the set of templates that are allowed for this Session, or null if there are no restrictions (ie. all templates are allowed).

int
@NonNull String

Constants

DEFAULT_SESSION_INFO

Added in 1.3.0
public static final @NonNull SessionInfo DEFAULT_SESSION_INFO

A default SessionInfo for the main display, used when the host is on a version that doesn't support this new class.

DISPLAY_TYPE_CLUSTER

Added in 1.3.0
public static final int DISPLAY_TYPE_CLUSTER = 1

The cluster display, usually located behind the steering wheel.

DISPLAY_TYPE_MAIN

Added in 1.3.0
public static final int DISPLAY_TYPE_MAIN = 0

The primary infotainment display usually in the center column of the vehicle.

Public constructors

SessionInfo

Added in 1.3.0
public SessionInfo(int displayType, @NonNull String sessionId)

Creates a new SessionInfo with the provided displayType and sessionId.

Public methods

equals

public boolean equals(@Nullable Object obj)

getDisplayType

Added in 1.3.0
public int getDisplayType()

Returns the type of display that the Session is rendering on.

getSessionId

Added in 1.3.0
public @NonNull String getSessionId()

Returns a session-stable ID, unique to the display that the Session is rendering on.

getSupportedTemplates

Added in 1.3.0
public @Nullable Set<Class<Template>> getSupportedTemplates(int carAppApiLevel)

Returns the set of templates that are allowed for this Session, or null if there are no restrictions (ie. all templates are allowed).

hashCode

public int hashCode()

toString

public @NonNull String toString()