Fix StackOverflowError by returning VLCApplication which is wrapped
(cherry picked from commit 4c3b295f69)
This commit is contained in:
committed by
Geoffrey Métais
parent
f6f5c9d5ae
commit
02ae94d64c
@@ -46,7 +46,7 @@ class DebugLogService : Service(), Logcat.Callback, Runnable {
|
||||
}
|
||||
|
||||
override fun getApplicationContext(): Context {
|
||||
return getContextWithLocale()
|
||||
return VLCApplication.appContext
|
||||
}
|
||||
|
||||
override fun onBind(intent: Intent): IBinder? {
|
||||
|
||||
@@ -96,7 +96,7 @@ class MediaParsingService : Service(), DevicesDiscoveryCb, CoroutineScope, Lifec
|
||||
}
|
||||
|
||||
override fun getApplicationContext(): Context {
|
||||
return getContextWithLocale()
|
||||
return VLCApplication.appContext
|
||||
}
|
||||
|
||||
@SuppressLint("WakelockTimeout")
|
||||
|
||||
@@ -448,7 +448,7 @@ class PlaybackService : MediaBrowserServiceCompat(), CoroutineScope, LifecycleOw
|
||||
}
|
||||
|
||||
override fun getApplicationContext(): Context {
|
||||
return getContextWithLocale()
|
||||
return VLCApplication.appContext
|
||||
}
|
||||
|
||||
override fun onCreate() {
|
||||
|
||||
@@ -38,7 +38,7 @@ class PreviewVideoInputService : TvInputService(), CoroutineScope {
|
||||
}
|
||||
|
||||
override fun getApplicationContext(): Context {
|
||||
return getContextWithLocale()
|
||||
return VLCApplication.appContext
|
||||
}
|
||||
|
||||
private inner class PreviewSession(context: Context
|
||||
|
||||
@@ -55,7 +55,7 @@ class RecommendationsService : IntentService("RecommendationService"), Coroutine
|
||||
}
|
||||
|
||||
override fun getApplicationContext(): Context {
|
||||
return getContextWithLocale()
|
||||
return VLCApplication.appContext
|
||||
}
|
||||
|
||||
override fun onCreate() {
|
||||
|
||||
@@ -80,7 +80,7 @@ class StartActivity : FragmentActivity() {
|
||||
}
|
||||
|
||||
override fun getApplicationContext(): Context {
|
||||
return getContextWithLocale()
|
||||
return VLCApplication.appContext
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
||||
@@ -9,6 +9,7 @@ import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.MainScope
|
||||
import kotlinx.coroutines.cancel
|
||||
import org.videolan.tools.KeyHelper
|
||||
import org.videolan.vlc.VLCApplication
|
||||
import org.videolan.vlc.gui.helpers.applyTheme
|
||||
import org.videolan.vlc.util.Settings
|
||||
import org.videolan.vlc.util.getContextWithLocale
|
||||
@@ -29,7 +30,7 @@ open class BaseActivity : AppCompatActivity(), CoroutineScope by MainScope() {
|
||||
}
|
||||
|
||||
override fun getApplicationContext(): Context {
|
||||
return getContextWithLocale()
|
||||
return VLCApplication.appContext
|
||||
}
|
||||
|
||||
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
|
||||
|
||||
@@ -61,7 +61,7 @@ abstract class BaseTvActivity : FragmentActivity(), CoroutineScope by MainScope(
|
||||
}
|
||||
|
||||
override fun getApplicationContext(): Context {
|
||||
return getContextWithLocale()
|
||||
return VLCApplication.appContext
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
||||
Reference in New Issue
Block a user