[Android] Fix crash on Android 2.x devices

Geoffrey Métais git at videolan.org
Fri Feb 26 14:59:58 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb 26 11:59:37 2016 +0100| [0ea7bdccd85afa78d63a18049baa3c70b4886871] | committer: Geoffrey Métais

Fix crash on Android 2.x devices

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

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 56839c0..14c3f7f 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -579,7 +579,7 @@ public class MainActivity extends AudioPlayerContainerActivity implements Search
 
         if (current instanceof NetworkBrowserFragment &&
                 !((NetworkBrowserFragment)current).isRootDirectory()) {
-            menu.findItem(R.id.ml_menu_search).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
+            MenuItemCompat.setShowAsAction(menu.findItem(R.id.ml_menu_search), MenuItem.SHOW_AS_ACTION_IF_ROOM);
             item = menu.findItem(R.id.ml_menu_save);
             item.setVisible(true);
             String mrl = ((BaseBrowserFragment)current).mMrl;



More information about the Android mailing list