[Android] Restart app when switching from TV to mobile UI
Geoffrey Métais
git at videolan.org
Wed May 13 06:35:45 CEST 2020
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue May 12 15:20:08 2020 +0200| [5155be77f1f5ee6817788be87c8695f4f04a8b00] | committer: Geoffrey Métais
Restart app when switching from TV to mobile UI
Fix #1335
> https://code.videolan.org/videolan/vlc-android/commit/5155be77f1f5ee6817788be87c8695f4f04a8b00
---
.../src/main/java/org/videolan/television/ui/MainTvActivity.kt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/application/television/src/main/java/org/videolan/television/ui/MainTvActivity.kt b/application/television/src/main/java/org/videolan/television/ui/MainTvActivity.kt
index c672f4e4c..f2a05fb5d 100644
--- a/application/television/src/main/java/org/videolan/television/ui/MainTvActivity.kt
+++ b/application/television/src/main/java/org/videolan/television/ui/MainTvActivity.kt
@@ -91,8 +91,7 @@ class MainTvActivity : BaseTvActivity() {
when (resultCode) {
RESULT_RESCAN -> this.reloadLibrary()
RESULT_RESTART, RESULT_RESTART_APP -> {
- val intent = intent
- intent.setClass(this, if (resultCode == RESULT_RESTART_APP) StartActivity::class.java else MainTvActivity::class.java)
+ val intent = Intent(this, if (resultCode == RESULT_RESTART_APP) StartActivity::class.java else MainTvActivity::class.java)
finish()
startActivity(intent)
}
More information about the Android
mailing list