[Android] Fix build for vanilla
Geoffrey Métais
git at videolan.org
Thu Jul 9 18:27:50 CEST 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jul 9 18:27:30 2015 +0200| [de5d0ff6449657ab3611435607b38ca758ae7696] | committer: Geoffrey Métais
Fix build for vanilla
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=de5d0ff6449657ab3611435607b38ca758ae7696
---
.../src/org/videolan/vlc/gui/PlaybackServiceActivity.java | 11 -----------
.../tv/src/org/videolan/vlc/gui/tv/MainTvActivity.java | 3 +++
.../videolan/vlc/gui/tv/browser/VerticalGridActivity.java | 5 +++++
3 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/PlaybackServiceActivity.java b/vlc-android/src/org/videolan/vlc/gui/PlaybackServiceActivity.java
index 529d9d0..179e84e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/PlaybackServiceActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/PlaybackServiceActivity.java
@@ -33,12 +33,10 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.annotation.MainThread;
-import android.view.KeyEvent;
import org.videolan.vlc.MediaLibrary;
import org.videolan.vlc.PlaybackService;
import org.videolan.vlc.VLCApplication;
-import org.videolan.vlc.gui.tv.SearchActivity;
import org.videolan.vlc.util.WeakHandler;
import java.util.ArrayList;
@@ -86,15 +84,6 @@ public abstract class PlaybackServiceActivity extends Activity implements Playba
mHelper.onStop();
}
- @Override
- public boolean onKeyDown(int keyCode, KeyEvent event) {
- if (keyCode == KeyEvent.KEYCODE_SEARCH){
- startActivity(new Intent(this, SearchActivity.class));
- return true;
- }
- return super.onKeyDown(keyCode, event);
- }
-
public Helper getHelper() {
return mHelper;
}
diff --git a/vlc-android/tv/src/org/videolan/vlc/gui/tv/MainTvActivity.java b/vlc-android/tv/src/org/videolan/vlc/gui/tv/MainTvActivity.java
index f1fc6b0..eb6741e 100644
--- a/vlc-android/tv/src/org/videolan/vlc/gui/tv/MainTvActivity.java
+++ b/vlc-android/tv/src/org/videolan/vlc/gui/tv/MainTvActivity.java
@@ -211,6 +211,9 @@ public class MainTvActivity extends PlaybackServiceActivity implements IVideoBro
intent.putExtra("item", new MediaItemDetails(media.getTitle(), media.getArtist(), media.getAlbum(), media.getLocation()));
startActivity(intent);
return true;
+ } else if (keyCode == KeyEvent.KEYCODE_SEARCH){
+ startActivity(new Intent(this, SearchActivity.class));
+ return true;
}
return super.onKeyDown(keyCode, event);
}
diff --git a/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/VerticalGridActivity.java b/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/VerticalGridActivity.java
index bb01c6f..9a51ef5 100644
--- a/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/VerticalGridActivity.java
+++ b/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/VerticalGridActivity.java
@@ -20,6 +20,7 @@
*****************************************************************************/
package org.videolan.vlc.gui.tv.browser;
+import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
@@ -29,6 +30,7 @@ import android.widget.TextView;
import org.videolan.vlc.R;
import org.videolan.vlc.gui.PlaybackServiceActivity;
import org.videolan.vlc.gui.tv.MainTvActivity;
+import org.videolan.vlc.gui.tv.SearchActivity;
public class VerticalGridActivity extends PlaybackServiceActivity implements GridFragment.BrowserActivity {
@@ -73,6 +75,9 @@ public class VerticalGridActivity extends PlaybackServiceActivity implements Gri
if (mFragment instanceof BrowserGridFragment && (keyCode == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE || keyCode == KeyEvent.KEYCODE_BUTTON_Y || keyCode == KeyEvent.KEYCODE_Y)) {
((BrowserGridFragment)mFragment).showDetails();
return true;
+ } else if (keyCode == KeyEvent.KEYCODE_SEARCH){
+ startActivity(new Intent(this, SearchActivity.class));
+ return true;
}
return super.onKeyDown(keyCode, event);
}
More information about the Android
mailing list