[Android] Proxy activity for consistent launch
Geoffrey Métais
git at videolan.org
Mon Jul 20 17:41:23 CEST 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jul 20 17:29:23 2015 +0200| [491f248c2829507f74ad2a843957c0dab792355e] | committer: Geoffrey Métais
Proxy activity for consistent launch
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=491f248c2829507f74ad2a843957c0dab792355e
---
vlc-android/tv/AndroidManifest.xml | 9 +++--
.../src/org/videolan/vlc/gui/tv/StartActivity.java | 41 ++++++++++++++++++++
2 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/vlc-android/tv/AndroidManifest.xml b/vlc-android/tv/AndroidManifest.xml
index 4011c86..941d306 100644
--- a/vlc-android/tv/AndroidManifest.xml
+++ b/vlc-android/tv/AndroidManifest.xml
@@ -34,9 +34,7 @@
tools:node="replace"
android:enabled="false"/>
<activity
- android:name="org.videolan.vlc.gui.tv.MainTvActivity"
- android:label="@string/app_name"
- android:theme="@style/Theme.Leanback" >
+ android:name="org.videolan.vlc.gui.tv.StartActivity">
<intent-filter android:priority="5" >
<action android:name="android.intent.action.MAIN" />
@@ -45,6 +43,11 @@
</intent-filter>
</activity>
<activity
+ android:name="org.videolan.vlc.gui.tv.MainTvActivity"
+ android:label="@string/app_name"
+ android:launchMode="singleInstance"
+ android:theme="@style/Theme.Leanback" />
+ <activity
android:name="org.videolan.vlc.gui.tv.DetailsActivity"
android:exported="true"
android:theme="@style/Theme.Leanback" />
diff --git a/vlc-android/tv/src/org/videolan/vlc/gui/tv/StartActivity.java b/vlc-android/tv/src/org/videolan/vlc/gui/tv/StartActivity.java
new file mode 100644
index 0000000..7e5b740
--- /dev/null
+++ b/vlc-android/tv/src/org/videolan/vlc/gui/tv/StartActivity.java
@@ -0,0 +1,41 @@
+/*
+ * *************************************************************************
+ * StartActivity.java
+ * **************************************************************************
+ * Copyright © 2015 VLC authors and VideoLAN
+ * Author: Geoffrey Métais
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * ***************************************************************************
+ */
+
+package org.videolan.vlc.gui.tv;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+
+import org.videolan.vlc.gui.video.VideoPlayerActivity;
+
+public class StartActivity extends Activity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ startActivity(new Intent(this, MainTvActivity.class));
+ finish();
+ return;
+ }
+}
More information about the Android
mailing list