Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
531
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
82c3c946
Commit
82c3c946
authored
5 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
TV: Fix Medialibrary not scanned at startup
parent
5c1aa5dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#6171
passed with stage
in 3 minutes and 58 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vlc-android/src/org/videolan/vlc/StartActivity.java
+2
-2
2 additions, 2 deletions
vlc-android/src/org/videolan/vlc/StartActivity.java
vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt
+0
-2
0 additions, 2 deletions
...src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt
with
2 additions
and
4 deletions
vlc-android/src/org/videolan/vlc/StartActivity.java
+
2
−
2
View file @
82c3c946
...
...
@@ -85,7 +85,7 @@ public class StartActivity extends FragmentActivity {
/* Check if it's the first run */
final
boolean
firstRun
=
savedVersionNumber
==
-
1
;
final
boolean
upgrade
=
firstRun
||
savedVersionNumber
!=
currentVersionNumber
;
if
(
upgrade
&&
!
firstRun
)
settings
.
edit
().
putInt
(
Constants
.
PREF_FIRST_RUN
,
currentVersionNumber
).
apply
();
if
(
upgrade
)
settings
.
edit
().
putInt
(
Constants
.
PREF_FIRST_RUN
,
currentVersionNumber
).
apply
();
final
boolean
tv
=
showTvUi
();
// Route search query
if
(
Intent
.
ACTION_SEARCH
.
equals
(
action
)
||
"com.google.android.gms.actions.SEARCH_ACTION"
.
equals
(
action
))
{
...
...
@@ -115,7 +115,7 @@ public class StartActivity extends FragmentActivity {
}
private
void
startApplication
(
final
boolean
tv
,
final
boolean
firstRun
,
final
boolean
upgrade
,
final
int
target
)
{
final
boolean
onboarding
=
firstRun
&&
!
tv
&&
!
Settings
.
INSTANCE
.
getInstance
(
StartActivity
.
this
).
getBoolean
(
OnboardingActivityKt
.
ONBOARDING_DONE_KEY
,
false
);
final
boolean
onboarding
=
!
tv
&&
!
Settings
.
INSTANCE
.
getInstance
(
StartActivity
.
this
).
getBoolean
(
OnboardingActivityKt
.
ONBOARDING_DONE_KEY
,
false
);
// Start Medialibrary from background to workaround Dispatchers.Main causing ANR
// cf https://github.com/Kotlin/kotlinx.coroutines/issues/878
if
(!
onboarding
)
{
...
...
This diff is collapsed.
Click to expand it.
vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt
+
0
−
2
View file @
82c3c946
...
...
@@ -13,7 +13,6 @@ import androidx.appcompat.app.AppCompatActivity
import
androidx.core.content.ContextCompat
import
androidx.viewpager.widget.ViewPager
import
kotlinx.coroutines.*
import
org.videolan.vlc.BuildConfig
import
org.videolan.vlc.MediaParsingService
import
org.videolan.vlc.R
import
org.videolan.vlc.gui.MainActivity
...
...
@@ -132,7 +131,6 @@ class OnboardingActivity : AppCompatActivity(), ViewPager.OnPageChangeListener,
.
putBoolean
(
ONBOARDING_DONE_KEY
,
true
)
.
putInt
(
KEY_MEDIALIBRARY_SCAN
,
if
(
viewModel
.
scanStorages
)
ML_SCAN_ON
else
ML_SCAN_OFF
)
.
putInt
(
"fragment_id"
,
if
(
viewModel
.
scanStorages
)
R
.
id
.
nav_video
else
R
.
id
.
nav_directories
)
.
putInt
(
PREF_FIRST_RUN
,
BuildConfig
.
VERSION_CODE
)
.
putString
(
"app_theme"
,
viewModel
.
theme
.
toString
())
.
apply
()
if
(!
viewModel
.
scanStorages
)
MediaParsingService
.
preselectedStorages
.
clear
()
...
...
This diff is collapsed.
Click to expand it.
Geoffrey Métais
@Dekans
mentioned in commit
62c511c8
·
5 years ago
mentioned in commit
62c511c8
mentioned in commit 62c511c8221354c965cf2fe0048789ba1c75f37f
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