[Android] Split manifests

Geoffrey Métais git at videolan.org
Mon Oct 26 16:37:10 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Oct 26 15:38:40 2015 +0100| [b8533b4422995682989242bf1d8d4ff49476ab34] | committer: Geoffrey Métais

Split manifests

Vanilla manifest declares its permissions
Idem for TV manifest
TV and Vanilla declare minSdk
Main manifest declares common permissions and targetSdk

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b8533b4422995682989242bf1d8d4ff49476ab34
---

 vlc-android/AndroidManifest.xml         |   18 +-----------------
 vlc-android/build.gradle                |    1 +
 vlc-android/tv/AndroidManifest.xml      |    4 +---
 vlc-android/vanilla/AndroidManifest.xml |   28 ++++++++++++++++++++++++++++
 4 files changed, 31 insertions(+), 20 deletions(-)

diff --git a/vlc-android/AndroidManifest.xml b/vlc-android/AndroidManifest.xml
index 940adc0..0ec2eb2 100644
--- a/vlc-android/AndroidManifest.xml
+++ b/vlc-android/AndroidManifest.xml
@@ -22,23 +22,13 @@
          8 is x86_64
          9 is MIPS64
     -->
+
     <uses-sdk
-        android:minSdkVersion="7"
         android:targetSdkVersion="22" />
 
-    <!-- /!\ PHONE_CALLS
-         See org.videolan.vlc.PhoneStateReceiver.java
-         -->
-    <uses-permission android:name="android.permission.READ_PHONE_STATE"
-        android:maxSdkVersion="18" /> <!-- android:maxSdkVersion="10" -->
-
     <!-- STORAGE -->
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 
-    <!-- DEVELOPMENT_TOOLS signature -->
-    <uses-permission android:name="android.permission.READ_LOGS"
-        android:maxSdkVersion="18" /> <!-- android:maxSdkVersion="15" -->
-
     <!-- Internet -->
     <uses-permission android:name="android.permission.INTERNET" />
 
@@ -426,12 +416,6 @@
         </activity>
 
         <service android:name=".PlaybackService" />
-
-        <receiver android:name=".PhoneStateReceiver" >
-            <intent-filter>
-                <action android:name="android.intent.action.PHONE_STATE" />
-            </intent-filter>
-        </receiver>
         <receiver
             android:name=".widget.VLCAppWidgetProviderWhite"
             android:exported="false"
diff --git a/vlc-android/build.gradle b/vlc-android/build.gradle
index 18946f0..64c80d4 100644
--- a/vlc-android/build.gradle
+++ b/vlc-android/build.gradle
@@ -170,6 +170,7 @@ android {
         java.srcDirs = ['test']
     }
     sourceSets.vanilla {
+        manifest.srcFile 'vanilla/AndroidManifest.xml'
         java.srcDirs = ['vanilla/src']
         res.srcDirs = ['vanilla/res']
     }
diff --git a/vlc-android/tv/AndroidManifest.xml b/vlc-android/tv/AndroidManifest.xml
index 64cca17..4634f45 100644
--- a/vlc-android/tv/AndroidManifest.xml
+++ b/vlc-android/tv/AndroidManifest.xml
@@ -4,8 +4,7 @@
     package="org.videolan.vlc">
 
     <uses-sdk
-        android:minSdkVersion="17"
-        android:targetSdkVersion="22" />
+        android:minSdkVersion="17" />
 
     <!-- Launch recommendations service once device is booted -->
     <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
@@ -454,7 +453,6 @@
                 <data android:pathPattern=".*\\.WMV" />
                 <data android:pathPattern=".*\\.WTV" />
                 <data android:pathPattern=".*\\.XESC" />
-
             </intent-filter>
         </activity>
     </application>
diff --git a/vlc-android/vanilla/AndroidManifest.xml b/vlc-android/vanilla/AndroidManifest.xml
new file mode 100644
index 0000000..ec47c89
--- /dev/null
+++ b/vlc-android/vanilla/AndroidManifest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="org.videolan.vlc">
+
+    <uses-sdk
+        android:minSdkVersion="7" />
+    <!-- DEVELOPMENT_TOOLS signature -->
+
+    <!-- /!\ PHONE_CALLS
+         See org.videolan.vlc.PhoneStateReceiver.java
+         -->
+    <uses-permission android:name="android.permission.READ_PHONE_STATE"
+        android:maxSdkVersion="18" /> <!-- android:maxSdkVersion="10" -->
+
+    <uses-permission android:name="android.permission.READ_LOGS"
+        android:maxSdkVersion="18" /> <!-- android:maxSdkVersion="15" -->
+
+    <application
+        android:name="org.videolan.vlc.VLCApplication">
+        <receiver android:name=".PhoneStateReceiver" >
+            <intent-filter>
+                <action android:name="android.intent.action.PHONE_STATE" />
+            </intent-filter>
+        </receiver>
+    </application>
+
+</manifest>



More information about the Android mailing list