blob: 8414a3c4e4be9a97cb3136a5604a5f7f6a9bf6b3 [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.
#
@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">
<application android:name="com.example.app1.TheApp" >
<activity android:name=".WidgetLibrary" />
<receiver android:name=".WidgetReceiver" />
<service android:name="AppService" />
<activity android:name="com.example.lib1.WidgetConfigurationUI" />
</application>
</manifest>
@lib2_activity
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lib2">
<application>
<!-- This won't be merged because there's already an identical definition in the main. -->
<activity android:name="LibActivity" />
<!-- Provider extracted from ApiDemos -->
<provider android:name=".app.LoaderThrottle$SimpleProvider" />
<!-- This one does not conflict with the main -->
<activity android:name="com.example.lib2.LibActivity2" />
</application>
</manifest>
@lib3_alias
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lib3" >
<!-- This manifest has a 'package' attribute and FQCNs get resolved. -->
<application
android:name="com.example.app1.TheApp"
android:backupAgent="com.example.app1.MyBackupAgent">
<activity-alias android:name="com.example.lib3.MyActivity"
android:targetActivity="com.example.app1.MainActivity" />
<!-- This is a dup of the 2nd activity in lib2 -->
<activity android:name="com.example.lib2.LibActivity2" />
<!-- These class name should be expanded. -->
<activity android:name=".LibActivity3" />
<service android:name=".LibService3" />
<receiver android:name=".LibReceiver3" />
<provider android:name=".LibProvider3" />
</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" />
# from @lib1_widget
<activity android:name="com.example.lib1.WidgetLibrary" />
<activity android:name="com.example.lib1.WidgetConfigurationUI" />
<service android:name="com.example.lib1.AppService" />
<receiver android:name="com.example.lib1.WidgetReceiver" />
# from @lib2_activity
<!-- This one does not conflict with the main -->
<activity android:name="com.example.lib2.LibActivity2" />
<!-- Provider extracted from ApiDemos -->
<provider android:name="com.example.lib2.app.LoaderThrottle$SimpleProvider" />
# from @lib3_alias
<!-- These class name should be expanded. -->
<activity android:name="com.example.lib3.LibActivity3" />
<activity-alias android:name="com.example.lib3.MyActivity"
android:targetActivity="com.example.app1.MainActivity" />
<service android:name="com.example.lib3.LibService3" />
<receiver android:name="com.example.lib3.LibReceiver3" />
<provider android:name="com.example.lib3.LibProvider3" />
</application>
</manifest>
@errors
P [ManifestMergerTest0_main.xml:6, ManifestMergerTest2_lib2_activity.xml:5] Skipping identical /manifest/application/activity[@name=com.example.lib2.LibActivity] element.
P [ManifestMergerTest0_main.xml, ManifestMergerTest3_lib3_alias.xml:8] Skipping identical /manifest/application/activity[@name=com.example.lib2.LibActivity2] element.