| # |
| # Text permission, permission-group and permission-tree: |
| # - Libraries can add any of these elements as long as they don't conflict |
| # with the destination: either the element must not be at all in the destination |
| # (as identified by the name) or it must match exactly. |
| # |
| # This one tests that duplicate definitions that are strictly equal generate errors |
| # with some (hopefully useful) diff. |
| # |
| |
| @fails |
| |
| @main |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.app1" |
| android:versionCode="100" |
| android:versionName="1.0.0"> |
| |
| <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="11"/> |
| |
| <supports-screens |
| android:largeScreens="true" |
| android:smallScreens="true" |
| android:normalScreens="true" |
| android:resizeable="true" |
| android:xlargeScreens="true" |
| /> |
| |
| <uses-permission android:name="android.permission.INTERNET" /> |
| <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> |
| |
| <uses-feature |
| android:name="android.hardware.touchscreen" |
| android:required="false" /> |
| |
| <permission |
| android:description="Insert boring description here" |
| android:icon="@drawable/robot" |
| android:label="Danger, Will Robinson!" |
| android:name="com.example.DangerWillRobinson" |
| android:permissionGroup="com.example.MasterControlPermission" |
| android:protectionLevel="dangerous" /> |
| |
| <permission |
| android:name="com.example.WhatWereYouThinking" |
| android:permissionGroup="com.example.MasterControlPermission" |
| android:protectionLevel="signatureOrSystem" /> |
| |
| <permission-group |
| android:description="Nobody expects..." |
| android:icon="@drawable/ignored_icon" |
| android:label="the Spanish Inquisition" |
| android:name="com.example.MasterControlPermission" /> |
| |
| <permission-tree |
| android:label="This is not a label" |
| android:name="com.example.PermTree" /> |
| |
| <application |
| android:label="@string/app_name" |
| android:icon="@drawable/app_icon" |
| android:backupAgent="com.example.app.BackupAgentClass" |
| android:restoreAnyVersion="true" |
| android:allowBackup="true" |
| android:killAfterRestore="true" |
| android:name="com.example.TheApp" > |
| |
| <activity |
| android:name="com.example.MainActivity" |
| android:label="@string/activity_name" |
| android:icon="@drawable/activity_icon" |
| android:theme="@style/Some.Theme"> |
| <intent-filter> |
| <action android:name="android.intent.action.MAIN" /> |
| <category android:name="android.intent.category.LAUNCHER" /> |
| </intent-filter> |
| </activity> |
| |
| </application> |
| |
| </manifest> |
| |
| |
| @lib1 |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.lib1"> |
| |
| <!-- Similar permissions as main manifest, but with slight conflicts --> |
| <permission |
| android:description="Different description here" |
| android:icon="@drawable/not_the_same_icon" |
| android:label="Danger, Will Robinson!" |
| android:name="com.example.DangerWillRobinson" |
| android:permissionGroup="com.example.MasterControlPermission" |
| android:protectionLevel="dangerous" /> |
| <!-- missing icon: --><permission-group |
| android:description="Nobody expects..." |
| android:label="the Spanish Inquisition" |
| android:name="com.example.MasterControlPermission" /> |
| <permission-tree |
| android:label="This is not the same label" |
| android:name="com.example.PermTree" /> |
| |
| <!-- different protectionLevel --><permission |
| android:name="com.example.WhatWereYouThinking" |
| android:permissionGroup="com.example.MasterControlPermission" |
| android:protectionLevel="normal" /> |
| |
| <!-- Added by lib1. --> |
| <permission |
| android:name="com.example.Permission1" |
| android:permissionGroup="com.example.Permission1" |
| android:protectionLevel="normal" /> |
| |
| <permission-group |
| android:description="This is getting" |
| android:label="too silly" |
| android:name="com.example.EnoughWithTheQuotes" /> |
| |
| <permission-tree |
| android:name="com.example.PermTree1" /> |
| |
| </manifest> |
| |
| |
| @lib2 |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.lib2"> |
| |
| <!-- Redefine one permission from main manifest --> |
| <permission |
| android:description="Insert boring description here" |
| android:icon="@drawable/robot" |
| android:label="Danger, Will Robinson!" |
| android:name="com.example.DangerWillRobinson" |
| android:permissionGroup="com.example.MasterControlPermission" |
| android:protectionLevel="dangerous" /> |
| <!-- And one from lib1, with a slight variation. --> |
| <permission |
| android:name="com.example.Permission1" |
| android:permissionGroup="com.example.Permission1" |
| android:protectionLevel="system" /> |
| <permission-tree |
| android:description="Extra description" |
| android:name="com.example.PermTree1" /> |
| |
| <!-- Added by lib2. --> |
| <permission |
| android:name="com.example.SensiblePermission2" |
| android:permissionGroup="com.example.SensibleGroup2" |
| android:protectionLevel="normal" /> |
| |
| <permission-group |
| android:name="com.example.SensibleGroup2" /> |
| |
| <permission-tree |
| android:name="com.example.PermTree2" /> |
| |
| </manifest> |
| |
| |
| @result |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.app1" |
| android:versionCode="100" |
| android:versionName="1.0.0"> |
| |
| <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="11"/> |
| |
| <supports-screens |
| android:largeScreens="true" |
| android:smallScreens="true" |
| android:normalScreens="true" |
| android:resizeable="true" |
| android:xlargeScreens="true" |
| /> |
| |
| <uses-permission android:name="android.permission.INTERNET" /> |
| <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> |
| |
| <uses-feature |
| android:name="android.hardware.touchscreen" |
| android:required="false" /> |
| |
| <permission |
| android:description="Insert boring description here" |
| android:icon="@drawable/robot" |
| android:label="Danger, Will Robinson!" |
| android:name="com.example.DangerWillRobinson" |
| android:permissionGroup="com.example.MasterControlPermission" |
| android:protectionLevel="dangerous" /> |
| |
| <permission |
| android:name="com.example.WhatWereYouThinking" |
| android:permissionGroup="com.example.MasterControlPermission" |
| android:protectionLevel="signatureOrSystem" /> |
| |
| <permission-group |
| android:description="Nobody expects..." |
| android:icon="@drawable/ignored_icon" |
| android:label="the Spanish Inquisition" |
| android:name="com.example.MasterControlPermission" /> |
| |
| <permission-tree |
| android:label="This is not a label" |
| android:name="com.example.PermTree" /> |
| |
| <application |
| android:label="@string/app_name" |
| android:icon="@drawable/app_icon" |
| android:backupAgent="com.example.app.BackupAgentClass" |
| android:restoreAnyVersion="true" |
| android:allowBackup="true" |
| android:killAfterRestore="true" |
| android:name="com.example.TheApp" > |
| |
| <activity |
| android:name="com.example.MainActivity" |
| android:label="@string/activity_name" |
| android:icon="@drawable/activity_icon" |
| android:theme="@style/Some.Theme"> |
| <intent-filter> |
| <action android:name="android.intent.action.MAIN" /> |
| <category android:name="android.intent.category.LAUNCHER" /> |
| </intent-filter> |
| </activity> |
| |
| </application> |
| |
| # Added by lib1 |
| <!-- Added by lib1. --> |
| <permission |
| android:name="com.example.Permission1" |
| android:permissionGroup="com.example.Permission1" |
| android:protectionLevel="normal" /> |
| |
| <permission-group |
| android:description="This is getting" |
| android:label="too silly" |
| android:name="com.example.EnoughWithTheQuotes" /> |
| |
| <permission-tree |
| android:name="com.example.PermTree1" /> |
| |
| # Added by lib2 |
| <!-- Added by lib2. --> |
| <permission |
| android:name="com.example.SensiblePermission2" |
| android:permissionGroup="com.example.SensibleGroup2" |
| android:protectionLevel="normal" /> |
| |
| <permission-group |
| android:name="com.example.SensibleGroup2" /> |
| |
| <permission-tree |
| android:name="com.example.PermTree2" /> |
| |
| </manifest> |
| |
| |
| @errors |
| |
| E [ManifestMergerTest0_main.xml:12, ManifestMergerTest1_lib1.xml:4] Trying to merge incompatible /manifest/permission[@name=com.example.DangerWillRobinson] element: |
| <permission android:name=com.example.DangerWillRobinson> |
| -- @android:description = Different description here |
| ++ @android:description = Insert boring description here |
| -- @android:icon = @drawable/not_the_same_icon |
| ++ @android:icon = @drawable/robot |
| @android:label = Danger, Will Robinson! |
| @android:name = com.example.DangerWillRobinson |
| @android:permissionGroup = com.example.MasterControlPermission |
| @android:protectionLevel = dangerous |
| E [ManifestMergerTest0_main.xml:14, ManifestMergerTest1_lib1.xml:8] Trying to merge incompatible /manifest/permission[@name=com.example.WhatWereYouThinking] element: |
| <permission android:name=com.example.WhatWereYouThinking> |
| @android:name = com.example.WhatWereYouThinking |
| @android:permissionGroup = com.example.MasterControlPermission |
| -- @android:protectionLevel = normal |
| ++ @android:protectionLevel = signatureOrSystem |
| E [ManifestMergerTest0_main.xml:16, ManifestMergerTest1_lib1.xml:5] Trying to merge incompatible /manifest/permission-group[@name=com.example.MasterControlPermission] element: |
| <permission-group android:name=com.example.MasterControlPermission> |
| @android:description = Nobody expects... |
| ++ @android:icon = @drawable/ignored_icon |
| @android:label = the Spanish Inquisition |
| @android:name = com.example.MasterControlPermission |
| E [ManifestMergerTest0_main.xml:18, ManifestMergerTest1_lib1.xml:6] Trying to merge incompatible /manifest/permission-tree[@name=com.example.PermTree] element: |
| <permission-tree android:name=com.example.PermTree> |
| ++ @android:label = This is not a label |
| -- @android:label = This is not the same label |
| @android:name = com.example.PermTree |
| E [ManifestMergerTest0_main.xml, ManifestMergerTest2_lib2.xml:6] Trying to merge incompatible /manifest/permission[@name=com.example.Permission1] element: |
| <permission android:name=com.example.Permission1> |
| @android:name = com.example.Permission1 |
| @android:permissionGroup = com.example.Permission1 |
| ++ @android:protectionLevel = normal |
| -- @android:protectionLevel = system |
| E [ManifestMergerTest0_main.xml, ManifestMergerTest2_lib2.xml:7] Trying to merge incompatible /manifest/permission-tree[@name=com.example.PermTree1] element: |
| <permission-tree android:name=com.example.PermTree1> |
| -- @android:description = Extra description |
| @android:name = com.example.PermTree1 |