android-components / mozilla.components.browser.state.selector / findCustomTabOrSelectedTab


fun BrowserState.findCustomTabOrSelectedTab(customTabId: String? = null): SessionState? (source)

Finds and returns the tab with the given id or the selected tab if no id was provided (null). Returns null if no matching tab could be found or if no selected tab exists.


customTabId - An optional ID of a custom tab. If not provided or null then the selected tab will be returned.

Return The custom tab with the provided ID or the selected tav if no id was provided.