Skip to content

Commit

Permalink
Closes #614: Fix Custom Tab shows blank screen on restore
Browse files Browse the repository at this point in the history
  • Loading branch information
jonalmeida committed Aug 30, 2019
1 parent b8d9ab6 commit 01c1b9c
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import mozilla.components.feature.customtabs.CustomTabsToolbarFeature
import mozilla.components.feature.session.SessionUseCases
import mozilla.components.support.base.feature.BackHandler
import mozilla.components.support.base.feature.LifecycleAwareFeature
import mozilla.components.support.base.log.logger.Logger
import org.mozilla.reference.browser.BrowserActivity
import org.mozilla.reference.browser.R
import org.mozilla.reference.browser.ext.share
Expand All @@ -32,12 +33,17 @@ class CustomTabsIntegration(
activity: Activity?
) : LifecycleAwareFeature, BackHandler {

private val session = sessionManager.findSessionById(sessionId)
private val logger = Logger("CustomTabsIntegration")

init {
if (session == null) {
logger.warn("The session for this ID, no longer exists. Finishing activity.")
activity?.finish()
}
toolbar.urlBoxView = null
}

private val session = sessionManager.findSessionById(sessionId)

private val menuToolbar by lazy {
val forward = BrowserMenuItemToolbar.Button(
mozilla.components.ui.icons.R.drawable.mozac_ic_forward,
Expand Down

0 comments on commit 01c1b9c

Please sign in to comment.