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
15
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
cd3b1250
Commit
cd3b1250
authored
5 years ago
by
Nicolas Pomepuy
Committed by
Geoffrey Métais
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Make the locale change synchronous at app start
parent
5314d42f
No related branches found
No related tags found
1 merge request
!69
Fix locale settings
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/VLCApplication.java
+4
-10
4 additions, 10 deletions
vlc-android/src/org/videolan/vlc/VLCApplication.java
with
4 additions
and
10 deletions
vlc-android/src/org/videolan/vlc/VLCApplication.java
+
4
−
10
View file @
cd3b1250
...
...
@@ -38,7 +38,6 @@ import org.videolan.vlc.gui.helpers.AudioUtil;
import
org.videolan.vlc.gui.helpers.BitmapCache
;
import
org.videolan.vlc.gui.helpers.NotificationHelper
;
import
org.videolan.vlc.util.Settings
;
import
org.videolan.vlc.util.Strings
;
import
org.videolan.vlc.util.Util
;
import
org.videolan.vlc.util.VLCInstance
;
import
org.videolan.vlc.util.WorkersKt
;
...
...
@@ -77,19 +76,14 @@ public class VLCApplication extends Application {
@Override
public
void
onCreate
()
{
super
.
onCreate
();
locale
=
Settings
.
INSTANCE
.
getInstance
(
instance
).
getString
(
"set_locale"
,
""
);
// Set the locale for API < 24 and set application resources and direction for API >=24
setLocale
(
getAppContext
());
//Initiate Kotlinx Dispatchers in a thread to prevent ANR
new
Thread
(
new
Runnable
()
{
@Override
public
void
run
()
{
WorkersKt
.
runIO
(
new
Runnable
()
{
@Override
public
void
run
()
{
locale
=
Settings
.
INSTANCE
.
getInstance
(
instance
).
getString
(
"set_locale"
,
""
);
// Set the locale for API < 24 and set application resources and direction for API >=24
setLocale
(
getAppContext
());
}
});
WorkersKt
.
runIO
(
new
Runnable
()
{
@TargetApi
(
Build
.
VERSION_CODES
.
O
)
...
...
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