blob: 83adc41719261b0d9a851a70892eaa5b1e5a2133 [file] [log] [blame]
#
# Test how FQCN class names are expanded and handled:
# - A library application can be merged doesn't have an app class name.
# - A library application can be merged if it has the same class name as the app.
# - A partial class name is expanded using the package name in a library or app.
#
# Test fail since com.example.lib1 has a different application name than the main
# manifest.
#
@main
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app1"
android:versionCode="100"
android:versionName="1.0.0">
<application
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">
<!-- App name is different, will not merge. -->
<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">
<!-- App name is good, but backupAgent is mentioned and is different, will not merge. -->
<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">
<application android:name="com.example.app1.TheApp">
<activity android:name=".WidgetLibrary3" />
</application>
</manifest>
@lib4_not_package
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- It's an error for the manifest to lack a 'package' attribute.
We just emit a warning in this case.
-->
<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">
<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" />
<activity android:name="com.example.lib1.WidgetLibrary1" />
<activity android:name="com.example.lib2.WidgetLibrary2" />
<activity android:name="com.example.lib3.WidgetLibrary3" />
# from @lib4_alias
<!-- 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>
@errors
ERROR:Attribute application@name value=\(com.example.app1.TheApp\) from ManifestMerger2Test0_main.xml:8:13
is also present at ManifestMerger2Test1_lib1_widget.xml:6:18 value=\(com.example.lib1.TheApp\)