[Android] MLStorage: fix bar back button

Duncan McNamara git at videolan.org
Mon Sep 27 05:57:19 UTC 2021


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Fri Sep 24 10:20:35 2021 +0200| [cce5bf0bdd726961dadd397c419465daf047382b] | committer: Nicolas Pomepuy

MLStorage: fix bar back button

The back button on the action bar did not work on tv.
Forcing true as a return value on onCreateOptionsMenu, gets the menu
created and the onOptionsSelected callback set

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

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

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt
index ac879f08b..f7d2a6a57 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.kt
@@ -138,6 +138,10 @@ class SecondaryActivity : ContentActivity(), IDialogManager {
         }
     }
 
+    override fun onCreateOptionsMenu(menu: Menu): Boolean {
+        return true
+    }
+
     override fun onPrepareOptionsMenu(menu: Menu?): Boolean {
         menu?.findItem(R.id.ml_menu_refresh)?.isVisible = Permissions.canReadStorage(this)
         return super.onPrepareOptionsMenu(menu)



More information about the Android mailing list