| # |
| # Test merge of uses-feature with android:glEsVersion: |
| # - Error if defined in lib+dest with dest < lib. |
| # - Never automatically change dest. |
| # - Default implied value is 1.0 (0x00010000). |
| # |
| # This tests a case that doesn't works because the main manifest doesn't declare |
| # the value and thus defaults to 1.0, so libraries with higher requirements will |
| # conflict. |
| # |
| |
| @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-feature |
| android:name="com.example.SomeFeature0" /> |
| <uses-feature |
| android:name="com.example.SomeFeature1" |
| android:required="false" /> |
| |
| <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" > |
| |
| </application> |
| |
| </manifest> |
| |
| |
| @lib1 |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.lib1"> |
| |
| <!-- Add a new feature with a glEsVersion of 2.1 --> |
| <uses-feature |
| android:name="com.example.SomeFeature5" |
| android:required="false" |
| android:glEsVersion="0x00020001" |
| /> |
| |
| <!-- Add a glEsVersion of 2.0, which will be ignored --> |
| <uses-feature |
| android:glEsVersion="0x00020000" |
| /> |
| |
| <application android:label="@string/lib_name1" /> |
| |
| </manifest> |
| |
| |
| @lib2 |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.lib2"> |
| |
| <!-- Add a new feature with a glEsVersion of 1.1 which will be ignored --> |
| <uses-feature |
| android:name="com.example.SomeFeature6" |
| android:required="false" |
| android:glEsVersion="0x00020001" |
| /> |
| |
| <!-- Add a glEsVersion of 1.0, which will be ignored --> |
| <uses-feature |
| android:glEsVersion="0x00010000" |
| /> |
| |
| <!-- Test some invalid values. --> |
| |
| <!-- 0 isn't a valid value and generates a warning stating it's ignored. --> |
| <uses-feature |
| android:glEsVersion="0" |
| /> |
| |
| <!-- 0.0xFFFF is 0.99... and generates a warning stating it's ignored. |
| The real minimal value is 1.0, not 0.99... --> |
| <uses-feature |
| android:glEsVersion="0x0000FFFF" |
| /> |
| |
| <!-- 0xFFFF.xFFFF is not invalid. It does correspond to 65535.9999847412109375 |
| which is unlikely to be valid anyway. It's not ignored and should parse just fine. |
| --> |
| <uses-feature |
| android:glEsVersion="0xFFFFFFFF" |
| /> |
| |
| <!-- This value shouldn't parse correctly with a Long and will generate a parsing error. |
| --> |
| <uses-feature |
| android:glEsVersion="0xFFFFFFFFFFFFFFFF" |
| /> |
| |
| </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-feature |
| android:name="com.example.SomeFeature0" /> |
| <uses-feature |
| android:name="com.example.SomeFeature1" |
| android:required="false" /> |
| |
| <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" > |
| |
| </application> |
| |
| <!-- Add a new feature with a glEsVersion of 2.1 --> |
| # lib1 adds this new node. Note how the glEsVersion=2.1 is stripped out. |
| <uses-feature |
| android:name="com.example.SomeFeature5" |
| android:required="false" |
| /> |
| |
| <!-- Add a new feature with a glEsVersion of 1.1 which will be ignored --> |
| # lib2 adds this new node. Note how the glEsVersion=2.0 is stripped out. |
| <uses-feature |
| android:name="com.example.SomeFeature6" |
| android:required="false" |
| /> |
| |
| </manifest> |
| |
| |
| @errors |
| |
| W [ManifestMergerTest0_main.xml:1, ManifestMergerTest1_lib1.xml:4] Main manifest has <uses-feature android:glEsVersion='0x00010000'> but library uses glEsVersion='0x00020001' |
| Note: main manifest lacks a <uses-feature android:glEsVersion> declaration, and thus defaults to glEsVersion=0x00010000. |
| W [ManifestMergerTest2_lib2.xml:12] Ignoring <uses-feature android:glEsVersion='0'> because it's smaller than 1.0. |
| W [ManifestMergerTest2_lib2.xml:15] Ignoring <uses-feature android:glEsVersion='0x0000FFFF'> because it's smaller than 1.0. |
| E [ManifestMergerTest2_lib2.xml:21] Failed to parse <uses-feature android:glEsVersion='0xFFFFFFFFFFFFFFFF'>: must be an integer in the form 0x00020001. |
| W [ManifestMergerTest0_main.xml:1, ManifestMergerTest2_lib2.xml:18] Main manifest has <uses-feature android:glEsVersion='0x00010000'> but library uses glEsVersion='0xffffffff' |
| Note: main manifest lacks a <uses-feature android:glEsVersion> declaration, and thus defaults to glEsVersion=0x00010000. |