AbstractSandboxedUiAdapter.AbstractSession


abstract class AbstractSandboxedUiAdapter.AbstractSession : 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

Public functions

open Unit

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.

open Unit

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

open Unit
notifyResized(width: Int, height: Int)

Notify the provider that the size of the host presentation area has changed to a size of width x height pixels.

open Unit
notifyUiChanged(uiContainerInfo: Bundle)

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

open Unit
notifyZOrderChanged(isZOrderOnTop: Boolean)

Notify the provider that there's a change in the intended z order of the session UI and it is now set to isZOrderOnTop.

Public properties

final Set<String>

The set of options that will be used to determine what information is calculated and sent to SessionObservers attached to this session.

Inherited properties

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

Return the View that presents content for this session.

Public constructors

AbstractSession

Added in 1.0.0-alpha11
AbstractSession()

Public functions

close

Added in 1.0.0-alpha11
open fun close(): Unit

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.

notifyConfigurationChanged

Added in 1.0.0-alpha11
open fun notifyConfigurationChanged(configuration: Configuration): Unit

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

notifyResized

Added in 1.0.0-alpha11
open fun notifyResized(width: Int, height: Int): Unit

Notify the provider that the size of the host presentation area has changed to a size of width x height pixels.

notifyUiChanged

Added in 1.0.0-alpha11
open fun notifyUiChanged(uiContainerInfo: Bundle): Unit

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 use addObserverFactory to observe UI changes rather than using this method.

notifyZOrderChanged

Added in 1.0.0-alpha11
open fun notifyZOrderChanged(isZOrderOnTop: Boolean): Unit

Notify the provider that there's a change in the intended z order of the session UI and it is now set to isZOrderOnTop.

Public properties

signalOptions

Added in 1.0.0-alpha11
final val signalOptionsSet<String>

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 with addObserverFactory will indicate that information should be calculated for this session.