Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Show more breadcrumbs
nop404
VLC-Android
Commits
e4847ee3
Commit
e4847ee3
authored
5 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Await app foreground to start MediaParsingService
parent
4a5f02a1
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/vlc-android/src/org/videolan/vlc/StartActivity.kt
+10
-6
10 additions, 6 deletions
...ication/vlc-android/src/org/videolan/vlc/StartActivity.kt
with
10 additions
and
6 deletions
application/vlc-android/src/org/videolan/vlc/StartActivity.kt
+
10
−
6
View file @
e4847ee3
...
...
@@ -42,10 +42,7 @@ import org.videolan.libvlc.util.AndroidUtil
import
org.videolan.medialibrary.MLServiceLocator
import
org.videolan.resources.*
import
org.videolan.resources.util.startMedialibrary
import
org.videolan.tools.BETA_WELCOME
import
org.videolan.tools.Settings
import
org.videolan.tools.awaitAppIsForegroung
import
org.videolan.tools.getContextWithLocale
import
org.videolan.tools.*
import
org.videolan.vlc.gui.BetaWelcomeActivity
import
org.videolan.vlc.gui.helpers.hf.StoragePermissionsDelegate.Companion.getStoragePermission
import
org.videolan.vlc.gui.onboarding.ONBOARDING_DONE_KEY
...
...
@@ -191,8 +188,15 @@ class StartActivity : FragmentActivity() {
// cf https://github.com/Kotlin/kotlinx.coroutines/issues/878
if
(!
onboarding
||
!
firstRun
)
{
Thread
{
this
@StartActivity
.
startMedialibrary
(
firstRun
,
upgrade
,
true
)
if
(
onboarding
)
settings
.
edit
().
putBoolean
(
ONBOARDING_DONE_KEY
,
true
).
apply
()
AppScope
.
launch
{
// workaround for a Android 9 bug
// https://issuetracker.google.com/issues/113122354
if
(
Build
.
VERSION
.
SDK_INT
==
Build
.
VERSION_CODES
.
P
&&
!
awaitAppIsForegroung
())
{
return
@launch
}
this
@StartActivity
.
startMedialibrary
(
firstRun
,
upgrade
,
true
)
if
(
onboarding
)
settings
.
edit
().
putBoolean
(
ONBOARDING_DONE_KEY
,
true
).
apply
()
}
}.
start
()
val
intent
=
Intent
().
apply
{
setClassName
(
applicationContext
,
if
(
tv
)
"org.videolan.television.ui.MainTvActivity"
else
"org.videolan.vlc.gui.MainActivity"
)
}
.
putExtra
(
EXTRA_FIRST_RUN
,
firstRun
)
...
...
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