Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
536
Issue boards
Milestones
Wiki
Code
Merge requests
19
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
0f89dade
Commit
0f89dade
authored
5 months ago
by
Nicolas Pomepuy
Committed by
Duncan McNamara
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Make the nightly auto update an opt-in feature
Fixes
#3076
parent
4c9e2e27
No related branches found
No related tags found
1 merge request
!1952
Make the nightly auto update an opt-in feature
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
application/resources/src/main/res/values/strings.xml
+2
-0
2 additions, 0 deletions
application/resources/src/main/res/values/strings.xml
application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
+13
-0
13 additions, 0 deletions
...tion/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
with
15 additions
and
0 deletions
application/resources/src/main/res/values/strings.xml
+
2
−
0
View file @
0f89dade
...
...
@@ -626,6 +626,8 @@
<string
name=
"install_nightly"
>
Install the nightly version
</string>
<string
name=
"install_nightly_alert"
>
Nightly builds are experimental versions updated everyday.\n\nExpect new features but also new bugs!
</string>
<string
name=
"nightly_version"
>
Found version: %2$s - %1$s
</string>
<string
name=
"update_nightly_alert"
>
You are running a nightly version. Would you like to periodically look for updates?
</string>
<string
name=
"update_nightly"
>
Auto update
</string>
<!-- Accessibility -->
...
...
This diff is collapsed.
Click to expand it.
application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
+
13
−
0
View file @
0f89dade
...
...
@@ -23,6 +23,7 @@ package org.videolan.vlc.gui
import
android.annotation.SuppressLint
import
android.annotation.TargetApi
import
android.app.Activity
import
android.app.AlertDialog
import
android.content.Intent
import
android.os.Build
import
android.os.Bundle
...
...
@@ -123,8 +124,20 @@ class MainActivity : ContentActivity(),
}
lifecycleScope
.
launch
{
if
(!
BuildConfig
.
DEBUG
)
return
@launch
AutoUpdate
.
clean
(
this
@MainActivity
.
application
)
if
(!
settings
.
getBoolean
(
KEY_SHOW_UPDATE
,
true
))
return
@launch
if
(!
settings
.
contains
(
KEY_SHOW_UPDATE
))
{
AlertDialog
.
Builder
(
this
@MainActivity
)
.
setTitle
(
resources
.
getString
(
R
.
string
.
update_nightly
))
.
setMessage
(
resources
.
getString
(
R
.
string
.
update_nightly_alert
))
.
setPositiveButton
(
R
.
string
.
yes
){
_
,
_
->
settings
.
putSingle
(
KEY_SHOW_UPDATE
,
true
)
}
.
setNegativeButton
(
R
.
string
.
no
,
null
)
.
show
()
return
@launch
}
AutoUpdate
.
checkUpdate
(
this
@MainActivity
.
application
)
{
url
,
date
->
val
updateDialog
=
UpdateDialog
().
apply
{
arguments
=
bundleOf
(
UPDATE_URL
to
url
,
UPDATE_DATE
to
date
.
time
)
...
...
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