[Android] Force Activity restart when changing medialib folders from empty view

Nicolas Pomepuy git at videolan.org
Thu Oct 17 12:09:13 CEST 2019


vlc-android | branch: 3.2.x | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Tue Oct 15 14:53:11 2019 +0200| [85f4ea377cb4f56960803b3a62c9a6d14b84b8b3] | committer: Geoffrey Métais

Force Activity restart when changing medialib folders from empty view

Fixes #1051

(cherry picked from commit 5983d0ada3faf5e1087fe35850b9b8d6efb0204e)

> https://code.videolan.org/videolan/vlc-android/commit/85f4ea377cb4f56960803b3a62c9a6d14b84b8b3
---

 vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt b/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt
index a79353363..1824cc060 100644
--- a/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt
@@ -42,10 +42,7 @@ import org.videolan.vlc.gui.helpers.UiTools
 import org.videolan.vlc.gui.tv.TvUtil
 import org.videolan.vlc.gui.video.VideoGridFragment
 import org.videolan.vlc.reloadLibrary
-import org.videolan.vlc.util.AndroidDevices
-import org.videolan.vlc.util.KEY_FOLDER
-import org.videolan.vlc.util.KEY_GROUP
-import org.videolan.vlc.util.RESULT_RESCAN
+import org.videolan.vlc.util.*
 
 @ExperimentalCoroutinesApi
 @ObsoleteCoroutinesApi
@@ -143,7 +140,10 @@ class SecondaryActivity : ContentActivity() {
                     }
                 }
             }
-            STORAGE_BROWSER -> fragment = StorageBrowserFragment()
+            STORAGE_BROWSER -> {
+                fragment = StorageBrowserFragment()
+                setResult(RESULT_RESTART)
+            }
             else -> throw IllegalArgumentException("Wrong fragment id.")
         }
     }



More information about the Android mailing list