SandboxedUiAdapter.Session
public interface SandboxedUiAdapter.Session extends AutoCloseable
AbstractSandboxedUiAdapter.AbstractSession |
An abstract class that implements |
A single session with the provider of remote content.
Summary
Public methods |
|
|---|---|
abstract void |
close()Close this session, indicating that the remote provider of content should dispose of associated resources and that the |
abstract @NonNull Set<@NonNull String> |
The set of options that will be used to determine what information is calculated and sent to |
abstract @NonNull View |
getView()Return the |
abstract void |
notifyConfigurationChanged(@NonNull Configuration configuration)Notify the session that the host configuration has changed to |
abstract void |
notifyResized(int width, int height)Notify the provider that the size of the host presentation area has changed to a size of |
abstract void |
notifySessionRendered(Notifies that the session has been rendered inside the container hosting this session. |
abstract void |
notifyUiChanged(@NonNull Bundle uiContainerInfo)Notify the session when the presentation state of its UI container has changed. |
abstract void |
notifyZOrderChanged(boolean isZOrderOnTop)Notify the provider that there's a change in the intended z order of the session UI and it is now set to |
Public methods
close
abstract void close()
Close this session, indicating that the remote provider of content should dispose of associated resources and that the SessionClient should not receive further callback events.
getSignalOptions
abstract @NonNull Set<@NonNull String> getSignalOptions()
The set of options that will be used to determine what information is calculated and sent to SessionObservers attached to this session.
This value should not be directly set by UI providers. Instead, the registration of any SessionObserverFactory will indicate that information should be calculated for this session.
getView
abstract @NonNull View getView()
Return the View that presents content for this session. The same view will be returned for the life of the session object. Accessing view after close may throw an IllegalStateException.
notifyConfigurationChanged
abstract void notifyConfigurationChanged(@NonNull Configuration configuration)
Notify the session that the host configuration has changed to configuration.
notifyResized
abstract void notifyResized(int width, int height)
Notify the provider that the size of the host presentation area has changed to a size of width x height pixels.
notifySessionRendered
abstract void notifySessionRendered(
@NonNull Set<@NonNull String> supportedSignalOptions
)
Notifies that the session has been rendered inside the container hosting this session.
supportedSignalOptions specifies the signal options which are supported by the host container.
UI providers should add SessionObserverFactorys to receive this value rather than using this method directly. This API is used to notify the SessionObservers associated with this session about the supported signal options for this session.
| See also | |
|---|---|
SandboxedUiAdapterSignalOptions |
notifyUiChanged
abstract void notifyUiChanged(@NonNull Bundle uiContainerInfo)
Notify the session when the presentation state of its UI container has changed.
uiContainerInfo contains a Bundle that represents the state of the container. The exact details of this Bundle depend on the container this Bundle is describing. This notification is not in real time and is throttled, so it should not be used to react to UI changes on the client side.
UI providers should add SessionObserverFactorys to observe UI changes rather than using this method directly.
notifyZOrderChanged
abstract void notifyZOrderChanged(boolean isZOrderOnTop)
Notify the provider that there's a change in the intended z order of the session UI and it is now set to isZOrderOnTop.