blob: 1e1c2d2c77b128ca0b597c63db201c3aff0b60d8 [file] [log] [blame]
#
# Test compatible-screens:
# - it's OK if a library defines one or multiple times an element already in the application.
# - it's a warning if the library defines an element not in the application.
# - this does not actually merge anything. The XML is not changed at all.
#
@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-configuration
android:reqFiveWayNav="true"
android:reqHardKeyboard="false"
android:reqKeyboardType="undefined"
android:reqNavigation="nonav"
android:reqTouchScreen="stylus"
/>
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<supports-gl-texture android:name="some.gl.texture1" />
<supports-gl-texture android:name="some.gl.texture2" />
<compatible-screens>
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
</compatible-screens>
<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">
<!-- this is the same compatible-screens than in the main. -->
<compatible-screens>
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
</compatible-screens>
</manifest>
@lib2
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lib2">
<!-- this is the not same compatible-screens than in the main. -->
<compatible-screens>
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
</compatible-screens>
<compatible-screens>
<screen android:screenSize="small" android:screenDensity="ldpi" />
</compatible-screens>
<compatible-screens>
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
</compatible-screens>
</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-configuration
android:reqFiveWayNav="true"
android:reqHardKeyboard="false"
android:reqKeyboardType="undefined"
android:reqNavigation="nonav"
android:reqTouchScreen="stylus"
/>
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<supports-gl-texture android:name="some.gl.texture1" />
<supports-gl-texture android:name="some.gl.texture2" />
<compatible-screens>
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
</compatible-screens>
<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>
@errors
W [ManifestMergerTest0_main.xml:1, ManifestMergerTest2_lib2.xml:4] /manifest/compatible-screens defined in library, missing from main manifest:
<compatible-screens>
<screen>
@android:screenDensity = ldpi
@android:screenSize = small
<screen>
@android:screenDensity = mdpi
@android:screenSize = normal
W [ManifestMergerTest0_main.xml:1, ManifestMergerTest2_lib2.xml:9] /manifest/compatible-screens defined in library, missing from main manifest:
<compatible-screens>
<screen>
@android:screenDensity = ldpi
@android:screenSize = small
W [ManifestMergerTest0_main.xml:1, ManifestMergerTest2_lib2.xml:13] /manifest/compatible-screens defined in library, missing from main manifest:
<compatible-screens>
<screen>
@android:screenDensity = ldpi
@android:screenSize = normal
<screen>
@android:screenDensity = mdpi
@android:screenSize = normal
<screen>
@android:screenDensity = hdpi
@android:screenSize = normal
<screen>
@android:screenDensity = xhdpi
@android:screenSize = normal