Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fenix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
The Tor Project
Applications
fenix
Commits
f88599bc
Unverified
Commit
f88599bc
authored
3 years ago
by
Codrut Topliceanu
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
For #18667 - Migrated exitImmersiveModeIfNeeded to Fenix (#18699)
parent
a9630984
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt
+2
-2
2 additions, 2 deletions
...ain/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt
app/src/main/java/org/mozilla/fenix/ext/Activity.kt
+13
-0
13 additions, 0 deletions
app/src/main/java/org/mozilla/fenix/ext/Activity.kt
with
15 additions
and
2 deletions
app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt
+
2
−
2
View file @
f88599bc
...
...
@@ -80,7 +80,6 @@ import mozilla.components.service.sync.logins.DefaultLoginValidationDelegate
import
mozilla.components.support.base.feature.PermissionsFeature
import
mozilla.components.support.base.feature.UserInteractionHandler
import
mozilla.components.support.base.feature.ViewBoundFeatureWrapper
import
mozilla.components.support.ktx.android.view.exitImmersiveModeIfNeeded
import
mozilla.components.support.ktx.android.view.hideKeyboard
import
mozilla.components.support.ktx.kotlinx.coroutines.flow.ifAnyChanged
import
mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged
...
...
@@ -110,7 +109,6 @@ import org.mozilla.fenix.downloads.DynamicDownloadDialog
import
org.mozilla.fenix.ext.accessibilityManager
import
org.mozilla.fenix.ext.breadcrumb
import
org.mozilla.fenix.ext.components
import
org.mozilla.fenix.ext.enterToImmersiveMode
import
org.mozilla.fenix.ext.getPreferenceKey
import
org.mozilla.fenix.ext.hideToolbar
import
org.mozilla.fenix.ext.metrics
...
...
@@ -130,6 +128,8 @@ import mozilla.components.feature.session.behavior.EngineViewBrowserToolbarBehav
import
mozilla.components.feature.webauthn.WebAuthnFeature
import
mozilla.components.support.base.feature.ActivityResultHandler
import
org.mozilla.fenix.GleanMetrics.PerfStartup
import
org.mozilla.fenix.ext.enterToImmersiveMode
import
org.mozilla.fenix.ext.exitImmersiveModeIfNeeded
import
org.mozilla.fenix.ext.measureNoInline
import
mozilla.components.feature.session.behavior.ToolbarPosition
as
MozacToolbarPosition
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/org/mozilla/fenix/ext/Activity.kt
+
13
−
0
View file @
f88599bc
...
...
@@ -24,6 +24,19 @@ fun Activity.enterToImmersiveMode() {
or
View
.
SYSTEM_UI_FLAG_IMMERSIVE_STICKY
)
}
/**
* Attempts to come out from immersive mode using the View.
*/
fun
Activity
.
exitImmersiveModeIfNeeded
()
{
if
(
WindowManager
.
LayoutParams
.
FLAG_KEEP_SCREEN_ON
and
window
.
attributes
.
flags
==
0
)
{
// We left immersive mode already.
return
}
window
.
clearFlags
(
WindowManager
.
LayoutParams
.
FLAG_KEEP_SCREEN_ON
)
window
.
decorView
.
systemUiVisibility
=
View
.
SYSTEM_UI_FLAG_VISIBLE
}
fun
Activity
.
breadcrumb
(
message
:
String
,
data
:
Map
<
String
,
String
>
=
emptyMap
()
...
...
This diff is collapsed.
Click to expand it.
Matthew Finkel
@sysrqb
mentioned in issue
#40155 (closed)
·
3 years ago
mentioned in issue
#40155 (closed)
mentioned in issue #40155
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment