Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Casanowow Life for love
VLC-Android
Commits
6b5de438
Commit
6b5de438
authored
Apr 12, 2018
by
Geoffrey Métais
Browse files
uiStart() for coroutines UI context fine dispatch
parent
3e06e580
Changes
1
Hide whitespace changes
Inline
Side-by-side
vlc-android/src/org/videolan/vlc/util/Kextensions.kt
View file @
6b5de438
...
...
@@ -2,8 +2,10 @@ package org.videolan.vlc.util
import
android.arch.lifecycle.ViewModel
import
android.arch.lifecycle.ViewModelProviders
import
android.os.Looper
import
android.support.v4.app.Fragment
import
android.support.v4.app.FragmentActivity
import
kotlinx.coroutines.experimental.CoroutineStart
import
kotlinx.coroutines.experimental.delay
import
java.io.File
import
java.net.URI
...
...
@@ -43,4 +45,6 @@ suspend fun retry (
delay
(
delayTime
)
}
return
block
()
// last attempt
}
\ No newline at end of file
}
fun
uiStart
()
=
if
(
Looper
.
getMainLooper
()
==
Looper
.
myLooper
())
CoroutineStart
.
UNDISPATCHED
else
CoroutineStart
.
DEFAULT
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment