Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
528
Issue boards
Milestones
Wiki
Code
Merge requests
14
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
54378474
Commit
54378474
authored
5 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Browser: prevent IllegalStateException
(cherry picked from commit
c414eb1e
)
parent
dfff5c76
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
+2
-0
2 additions, 0 deletions
...d/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
with
2 additions
and
0 deletions
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.kt
+
2
−
0
View file @
54378474
...
...
@@ -32,6 +32,7 @@ import androidx.appcompat.view.ActionMode
import
androidx.core.content.ContextCompat
import
androidx.fragment.app.Fragment
import
androidx.fragment.app.FragmentManager
import
androidx.lifecycle.Lifecycle
import
androidx.lifecycle.Observer
import
androidx.recyclerview.widget.DividerItemDecoration
import
androidx.recyclerview.widget.LinearLayoutManager
...
...
@@ -208,6 +209,7 @@ abstract class BaseBrowserFragment : MediaBrowserFragment<BrowserModel>(), IRefr
fun
goBack
():
Boolean
{
val
activity
=
activity
?:
return
false
if
(!
activity
.
lifecycle
.
currentState
.
isAtLeast
(
Lifecycle
.
State
.
RESUMED
))
return
false
if
(!
isRootDirectory
&&
!
activity
.
isFinishing
&&
!
activity
.
isDestroyed
)
activity
.
supportFragmentManager
.
popBackStack
()
return
!
isRootDirectory
}
...
...
This diff is collapsed.
Click to expand it.
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