Skip to content
Snippets Groups Projects
Commit 6daa6fdc authored by Duncan McNamara's avatar Duncan McNamara Committed by Nicolas Pomepuy
Browse files

AndroidTv: refresh ml after storage perm granted

After granting storage permission, if calling activity is an instance
of CustomActionController, it will trigger onStorageAccessGranted
callback. Added implementation to MainTvActivity to trigger ML refresh
on storage permission granting so that the main ui doesn't stay stuck on
the request permission headers.


(cherry picked from commit b790c794)
parent 451e44c8
No related branches found
No related tags found
No related merge requests found
......@@ -37,11 +37,12 @@ import org.videolan.tools.RESULT_RESTART_APP
import org.videolan.tools.WeakHandler
import org.videolan.vlc.ScanProgress
import org.videolan.vlc.StartActivity
import org.videolan.vlc.gui.helpers.hf.StoragePermissionsDelegate
import org.videolan.vlc.reloadLibrary
import org.videolan.vlc.util.Util
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
class MainTvActivity : BaseTvActivity() {
class MainTvActivity : BaseTvActivity(), StoragePermissionsDelegate.CustomActionController {
private lateinit var browseFragment: MainTvFragment
private lateinit var progressBar: ProgressBar
......@@ -114,6 +115,10 @@ class MainTvActivity : BaseTvActivity() {
handler.sendEmptyMessageDelayed(HIDE_LOADING, 500)
}
override fun onStorageAccessGranted() {
refresh()
}
override fun refresh() {
this.reloadLibrary()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment