[Android] Show tablet/TV audio player according to device
Geoffrey Métais
git at videolan.org
Fri Jan 22 17:59:50 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jan 22 17:58:58 2016 +0100| [45d22e48350d98d8b20e923aa3eaed5aa2bb08a5] | committer: Geoffrey Métais
Show tablet/TV audio player according to device
> https://code.videolan.org/videolan/vlc-android/commit/45d22e48350d98d8b20e923aa3eaed5aa2bb08a5
---
vlc-android/AndroidManifest.xml | 2 +-
vlc-android/src/org/videolan/vlc/StartActivity.java | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/vlc-android/AndroidManifest.xml b/vlc-android/AndroidManifest.xml
index 513e5b6..96f89c0 100644
--- a/vlc-android/AndroidManifest.xml
+++ b/vlc-android/AndroidManifest.xml
@@ -524,7 +524,7 @@
<activity
android:name="org.videolan.vlc.gui.tv.audioplayer.AudioPlayerActivity"
android:exported="true"
- android:launchMode="singleTop"
+ android:launchMode="singleTask"
android:allowTaskReparenting="true"
android:theme="@style/Theme.Leanback" />
<activity android:name=".gui.tv.preferences.PreferencesActivity"
diff --git a/vlc-android/src/org/videolan/vlc/StartActivity.java b/vlc-android/src/org/videolan/vlc/StartActivity.java
index 7f92290..9a991a2 100644
--- a/vlc-android/src/org/videolan/vlc/StartActivity.java
+++ b/vlc-android/src/org/videolan/vlc/StartActivity.java
@@ -34,8 +34,10 @@ import android.text.TextUtils;
import android.util.Log;
import org.videolan.libvlc.util.AndroidUtil;
+import org.videolan.vlc.gui.AudioPlayerContainerActivity;
import org.videolan.vlc.gui.MainActivity;
import org.videolan.vlc.gui.tv.MainTvActivity;
+import org.videolan.vlc.gui.tv.audioplayer.AudioPlayerActivity;
import org.videolan.vlc.media.MediaUtils;
import org.videolan.vlc.util.AndroidDevices;
import org.videolan.vlc.util.Util;
@@ -56,6 +58,8 @@ public class StartActivity extends Activity {
if (intent != null && TextUtils.equals(intent.getAction(), Intent.ACTION_VIEW) && intent.getData() != null) {
intent.setData(getUri(intent));
MediaUtils.openUri(this, intent.getData());
+ } else if (intent != null && TextUtils.equals(intent.getAction(), AudioPlayerContainerActivity.ACTION_SHOW_PLAYER)) {
+ startActivity(new Intent(this, VLCApplication.showTvUi() ? AudioPlayerActivity.class : MainActivity.class));
} else
startActivity(new Intent(this, VLCApplication.showTvUi() ? MainTvActivity.class : MainActivity.class));
finish();
More information about the Android
mailing list