[fenix] For https://github.com/mozilla-mobile/fenix/issues/1973 - Toggle QR button on deny permissions, fix engineView crashes

pull/600/head
Emily Kager 5 years ago committed by Jeff Boek
parent 50c466c86b
commit f523d9df59

@ -167,7 +167,7 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
}
}
view.engineView.asView().apply {
view.swipeRefresh.apply {
val toolbarSize =
(resources.displayMetrics.density * TOOLBAR_HEIGHT).toInt() +
(if (customTabSessionId == null) QUICK_ACTION_SHEET_HANDLE_HEIGHT else 0)
@ -692,7 +692,7 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
ToolbarMenu.Item.SaveToCollection -> showSaveToCollection()
ToolbarMenu.Item.OpenInFenix -> {
// To not get a "Display Already Acquired" error we need to force remove the engineView here
browserLayout?.removeView(engineView as View)
swipeRefresh?.removeView(engineView as View)
val intent = Intent(context, IntentReceiverActivity::class.java)
intent.action = Intent.ACTION_VIEW
getSessionById()?.customTabConfig = null

@ -311,6 +311,8 @@ class SearchFragment : Fragment(), BackHandler {
context?.let { context: Context ->
if (context.isPermissionGranted(Manifest.permission.CAMERA)) {
permissionDidUpdate = true
} else {
view?.search_scan_button?.isChecked = false
}
}
}

Loading…
Cancel
Save