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
4a6ff4ad
Commit
4a6ff4ad
authored
5 years ago
by
Nicolas Pomepuy
Committed by
Geoffrey Métais
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Request the locale settings outside of the main thread
parent
70f5de75
No related branches found
No related tags found
1 merge request
!69
Fix locale settings
Pipeline
#6183
passed with stage
in 3 minutes and 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/VLCApplication.java
+10
-3
10 additions, 3 deletions
vlc-android/src/org/videolan/vlc/VLCApplication.java
with
10 additions
and
3 deletions
vlc-android/src/org/videolan/vlc/VLCApplication.java
+
10
−
3
View file @
4a6ff4ad
...
...
@@ -76,15 +76,22 @@ 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
()
{
locale
=
Settings
.
INSTANCE
.
getInstance
(
instance
).
getString
(
"set_locale"
,
""
);
WorkersKt
.
runOnMainThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
// 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
)
@Override
...
...
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