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 |
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 |
Public methods |
|
|---|---|
boolean |
|
int |
Returns the type of display that the |
@NonNull String |
Returns a session-stable ID, unique to the display that the |
@Nullable Set<Class<Template>> |
getSupportedTemplates(int carAppApiLevel)Returns the set of templates that are allowed for this |
int |
hashCode() |
@NonNull String |
toString() |
Constants
DEFAULT_SESSION_INFO
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
public static final int DISPLAY_TYPE_CLUSTER = 1
The cluster display, usually located behind the steering wheel. Note: There can be more than one cluster session running in case of multi display cars.
DISPLAY_TYPE_MAIN
public static final int DISPLAY_TYPE_MAIN = 0
The primary infotainment display usually in the center column of the vehicle.
Public constructors
SessionInfo
public SessionInfo(int displayType, @NonNull String sessionId)
Creates a new SessionInfo with the provided displayType and
sessionId.
Public methods
getDisplayType
public int getDisplayType()
Returns the type of display that the Session is rendering on.
getSessionId
public @NonNull String getSessionId()
Returns a session-stable ID, unique to the display that the Session is rendering on.