blob: 3ae1b7bd5d98f47eeb4df7a3ea33d5201a963fad [file] [log] [blame]
#
# Test the tools:merge="override" tag on an application.
# It essentially ignores _any_ application tag from libraries.
# All other non-application elements are merged as usual.
#
@main
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.app1"
android:versionCode="100"
android:versionName="1.0.0">
<supports-screens
android:largeScreens="true"
android:smallScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:xlargeScreens="true"
/>
<uses-permission android:name="android.permission.INTERNET" />
<application
tools:node="replace"
android:name="TheApp"
android:backupAgent=".MyBackupAgent" >
<activity android:name=".MainActivity" />
<receiver android:name="AppReceiver" />
<activity android:name="com.example.lib2.LibActivity" />
</application>
</manifest>
@lib1_widget
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lib1">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<permission
android:name="com.example.WhatWereYouThinking"
android:permissionGroup="com.example.MasterControlPermission"
android:protectionLevel="signatureOrSystem" />
<!-- This is overridden by main manifest and never merged, INCLUDING all activities. -->
<application android:name="TheApp" >
<activity android:name=".WidgetLibrary1" />
</application>
</manifest>
@lib2_widget
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lib2">
<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" />
<!-- This is overridden by main manifest and never merged, INCLUDING all activities. -->
<application
android:name="com.example.app1.TheApp"
android:backupAgent=".MyBackupAgent" >
<activity android:name=".WidgetLibrary2" />
<activity android:name=".LibActivity" />
</application>
</manifest>
@lib3_widget
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lib3">
<permission-group
android:description="Nobody expects..."
android:icon="@drawable/ignored_icon"
android:label="the Spanish Inquisition"
android:name="com.example.MasterControlPermission" />
<!-- This is overridden by main manifest and never merged, INCLUDING all activities. -->
<application android:name="com.example.app1.TheApp">
<activity android:name=".WidgetLibrary3" />
</application>
</manifest>
@lib4_not_package
<!-- It's an error for the manifest to lack a 'package' attribute.
We just emit a warning in this case.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Permission tree for lib4 -->
<permission-tree
android:label="This is not a label"
android:name="com.example.PermTree" />
<!-- This is overridden by main manifest and never merged, INCLUDING all activities. -->
<application>
<!-- These class name can't be expanded due to the lack of 'package' attribute. -->
<activity android:name=".LibActivity4" />
<service android:name=".LibService4" />
<receiver android:name=".LibReceiver4" />
<provider android:name=".LibProvider4" />
</application>
</manifest>
@result
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app1"
android:versionCode="100"
android:versionName="1.0.0">
<supports-screens
android:largeScreens="true"
android:smallScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:xlargeScreens="true"
/>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name="com.example.app1.TheApp"
android:backupAgent="com.example.app1.MyBackupAgent" >
<activity android:name="com.example.app1.MainActivity" />
<receiver android:name="com.example.app1.AppReceiver" />
<activity android:name="com.example.lib2.LibActivity" />
</application>
<permission
android:name="com.example.WhatWereYouThinking"
android:permissionGroup="com.example.MasterControlPermission"
android:protectionLevel="signatureOrSystem" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<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" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<permission-group
android:description="Nobody expects..."
android:icon="@drawable/ignored_icon"
android:label="the Spanish Inquisition"
android:name="com.example.MasterControlPermission" />
<!-- Permission tree for lib4 -->
<permission-tree
android:label="This is not a label"
android:name="com.example.PermTree" />
</manifest>
@errors
WARNING:Missing 'package' declaration in manifest at ManifestMerger2Test4_lib4_not_package.xml:4:1-21:12