2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/4078 - Request landscape mode when entering fullscreen

This commit is contained in:
Emily Kager 2019-07-16 14:39:22 -07:00 committed by Emily Kager
parent ebd2e02a60
commit 1b4b03a841

View File

@ -8,6 +8,7 @@ import android.content.ClipData
import android.content.ClipboardManager import android.content.ClipboardManager
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.content.pm.ActivityInfo
import android.os.Bundle import android.os.Bundle
import android.view.Gravity import android.view.Gravity
import android.view.LayoutInflater import android.view.LayoutInflater
@ -311,10 +312,12 @@ class BrowserFragment : Fragment(), BackHandler {
.setAnchorView(toolbarComponent.uiView.view) .setAnchorView(toolbarComponent.uiView.view)
.setText(getString(R.string.full_screen_notification)) .setText(getString(R.string.full_screen_notification))
.show() .show()
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
activity?.enterToImmersiveMode() activity?.enterToImmersiveMode()
toolbar.visibility = View.GONE toolbar.visibility = View.GONE
nestedScrollQuickAction.visibility = View.GONE nestedScrollQuickAction.visibility = View.GONE
} else { } else {
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER
activity?.exitImmersiveModeIfNeeded() activity?.exitImmersiveModeIfNeeded()
(activity as HomeActivity).let { activity: HomeActivity -> (activity as HomeActivity).let { activity: HomeActivity ->
ThemeManager.applyStatusBarTheme( ThemeManager.applyStatusBarTheme(