AbstractSandboxedUiAdapter.AbstractSession


public abstract class AbstractSandboxedUiAdapter.AbstractSession implements SandboxedUiAdapter.Session


An abstract class that implements SandboxedUiAdapter.Session so that a UI provider does not need to implement the entire interface.

UI providers should use this class rather than implementing SandboxedUiAdapter.Session.

Summary

Public constructors

This method is deprecated. This library is no longer supported.

Public methods

void

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.

final @NonNull Set<@NonNull String>

This method is deprecated. This library is no longer supported.

void

Notify the session that the host configuration has changed to configuration.

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.

void
notifySessionRendered(
    @NonNull Set<@NonNull String> supportedSignalOptions
)

Notifies that the session has been rendered inside the container hosting this session.

void
notifyUiChanged(@NonNull Bundle uiContainerInfo)

Notify the session when the presentation state of its UI container has changed.

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.

Inherited methods

From androidx.privacysandbox.ui.core.SandboxedUiAdapter.Session
abstract @NonNull View

This method is deprecated. This library is no longer supported.

Public constructors

AbstractSession

Added in 1.0.0-alpha17
Deprecated in 1.0.0-alpha17
public AbstractSession()

Public methods

close

Added in 1.0.0-alpha17
Deprecated in 1.0.0-alpha17
public 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

Added in 1.0.0-alpha17
Deprecated in 1.0.0-alpha17
public final @NonNull Set<@NonNull StringgetSignalOptions()

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.

notifyConfigurationChanged

Added in 1.0.0-alpha17
Deprecated in 1.0.0-alpha17
public void notifyConfigurationChanged(@NonNull Configuration configuration)

Notify the session that the host configuration has changed to configuration.

notifyResized

Added in 1.0.0-alpha17
Deprecated in 1.0.0-alpha17
public 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

Added in 1.0.0-alpha17
Deprecated in 1.0.0-alpha17
public 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.

notifyUiChanged

Added in 1.0.0-alpha17
Deprecated in 1.0.0-alpha17
public 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

Added in 1.0.0-alpha17
Deprecated in 1.0.0-alpha17
public 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.