[Android] Fix TV build

Geoffrey Métais git at videolan.org
Thu Jan 7 10:10:29 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jan  7 10:09:17 2016 +0100| [f3bf00b72ff6b40559a46ced830078752fa1a04f] | committer: Geoffrey Métais

Fix TV build

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

 .../src/org/videolan/vlc/gui/preferences/PreferencesActivity.java     | 1 -
 vlc-android/src/org/videolan/vlc/PlaybackService.java                 | 3 ++-
 vlc-android/src/org/videolan/vlc/gui/MainActivity.java                | 3 ++-
 .../src/org/videolan/vlc/gui/preferences/PreferencesFragment.java     | 4 +++-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/vlc-android/flavors/vanilla/src/org/videolan/vlc/gui/preferences/PreferencesActivity.java b/vlc-android/flavors/vanilla/src/org/videolan/vlc/gui/preferences/PreferencesActivity.java
index 73edb2f..d0a7aec 100644
--- a/vlc-android/flavors/vanilla/src/org/videolan/vlc/gui/preferences/PreferencesActivity.java
+++ b/vlc-android/flavors/vanilla/src/org/videolan/vlc/gui/preferences/PreferencesActivity.java
@@ -45,7 +45,6 @@ public class PreferencesActivity extends AppCompatActivity implements PlaybackSe
     public final static String VIDEO_BACKGROUND = "video_background";
     public final static String VIDEO_RESTORE = "video_restore";
     public final static String AUTO_RESCAN = "auto_rescan";
-    public final static String PLAYBACK_HISTORY = "playback_history";
     public final static int RESULT_RESCAN = RESULT_FIRST_USER + 1;
     public final static int RESULT_RESTART = RESULT_FIRST_USER + 2;
 
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 454c2da..7544a25 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -68,6 +68,7 @@ import org.videolan.libvlc.util.AndroidUtil;
 import org.videolan.vlc.gui.AudioPlayerContainerActivity;
 import org.videolan.vlc.gui.helpers.AudioUtil;
 import org.videolan.vlc.gui.preferences.PreferencesActivity;
+import org.videolan.vlc.gui.preferences.PreferencesFragment;
 import org.videolan.vlc.gui.video.VideoPlayerActivity;
 import org.videolan.vlc.media.MediaDatabase;
 import org.videolan.vlc.media.MediaUtils;
@@ -1655,7 +1656,7 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
 
             notifyTrackChanged();
             determinePrevAndNextIndices();
-            if (mSettings.getBoolean(PreferencesActivity.PLAYBACK_HISTORY, true))
+            if (mSettings.getBoolean(PreferencesFragment.PLAYBACK_HISTORY, true))
                 VLCApplication.runBackground(new Runnable() {
                     @Override
                     public void run() {
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 6a1dc5f..986f651 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -76,6 +76,7 @@ import org.videolan.vlc.gui.helpers.SearchSuggestionsAdapter;
 import org.videolan.vlc.gui.helpers.UiTools;
 import org.videolan.vlc.gui.network.MRLPanelFragment;
 import org.videolan.vlc.gui.preferences.PreferencesActivity;
+import org.videolan.vlc.gui.preferences.PreferencesFragment;
 import org.videolan.vlc.gui.video.VideoGridFragment;
 import org.videolan.vlc.gui.video.VideoListAdapter;
 import org.videolan.vlc.gui.view.HackyDrawerLayout;
@@ -236,7 +237,7 @@ public class MainActivity extends AudioPlayerContainerActivity implements Search
             mNavigationView.getMenu().findItem(R.id.nav_network).setVisible(true);
         }
 
-        mNavigationView.getMenu().findItem(R.id.nav_history).setVisible(mSettings.getBoolean(PreferencesActivity.PLAYBACK_HISTORY, true));
+        mNavigationView.getMenu().findItem(R.id.nav_history).setVisible(mSettings.getBoolean(PreferencesFragment.PLAYBACK_HISTORY, true));
 
 
         if (AndroidUtil.isLolliPopOrLater())
diff --git a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesFragment.java b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesFragment.java
index b7a6f2d..a9980a4 100644
--- a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesFragment.java
@@ -41,6 +41,8 @@ public class PreferencesFragment extends BasePreferenceFragment implements Share
 
     public final static String TAG = "VLC/PreferencesFragment";
 
+    public final static String PLAYBACK_HISTORY = "playback_history";
+
     @Override
     protected int getXml() {
         return R.xml.preferences;
@@ -112,7 +114,7 @@ public class PreferencesFragment extends BasePreferenceFragment implements Share
             case "dev_category":
                 loadFragment(new Developer());
                 break;
-            case PreferencesActivity.PLAYBACK_HISTORY:
+            case PLAYBACK_HISTORY:
                 getActivity().setResult(PreferencesActivity.RESULT_RESTART);
                 return true;
             default:



More information about the Android mailing list