| # |
| # 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" |
| /> |
| |
| </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 |
| |
| ERROR:Attribute uses-feature#0@glEsVersion at ManifestMerger2Test2_lib2.xml:21:9 is not a valid hexadecimal 32 bit value, found 0 |
| ERROR:Attribute uses-feature#0x0000FFFF@glEsVersion at ManifestMerger2Test2_lib2.xml:27:9 is not a valid hexadecimal value, minimum is 0x00010000, maximum is 0x7FFFFFFF, found 0x0000FFFF |
| ERROR:Attribute uses-feature#0xFFFFFFFF@glEsVersion at ManifestMerger2Test2_lib2.xml:34:9 is not a valid hexadecimal value, minimum is 0x00010000, maximum is 0x7FFFFFFF, found 0xFFFFFFFF |
| ERROR:Attribute uses-feature#0xFFFFFFFFFFFFFFFF@glEsVersion at ManifestMerger2Test2_lib2.xml:40:9 is not a valid hexadecimal 32 bit value, found 0xFFFFFFFFFFFFFFFF |
| ERROR:Validation failed, exiting |