From 1b4b03a8410e70c107789d05faca9cd1898437f5 Mon Sep 17 00:00:00 2001 From: Emily Kager Date: Tue, 16 Jul 2019 14:39:22 -0700 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/4078 - Request landscape mode when entering fullscreen --- app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt b/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt index 422990cf40..3e9f202c1d 100644 --- a/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt @@ -8,6 +8,7 @@ import android.content.ClipData import android.content.ClipboardManager import android.content.Context import android.content.Intent +import android.content.pm.ActivityInfo import android.os.Bundle import android.view.Gravity import android.view.LayoutInflater @@ -311,10 +312,12 @@ class BrowserFragment : Fragment(), BackHandler { .setAnchorView(toolbarComponent.uiView.view) .setText(getString(R.string.full_screen_notification)) .show() + activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE activity?.enterToImmersiveMode() toolbar.visibility = View.GONE nestedScrollQuickAction.visibility = View.GONE } else { + activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER activity?.exitImmersiveModeIfNeeded() (activity as HomeActivity).let { activity: HomeActivity -> ThemeManager.applyStatusBarTheme(