Loading api/current.xml +20 −9 Original line number Diff line number Diff line Loading @@ -1663,7 +1663,7 @@ type="int" transient="false" volatile="false" value="16843406" value="16843407" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -2664,7 +2664,7 @@ type="int" transient="false" volatile="false" value="16843407" value="16843408" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -6422,6 +6422,17 @@ visibility="public" > </field> <field name="required" type="int" transient="false" volatile="false" value="16843406" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="resizeable" type="int" transient="false" Loading Loading @@ -7449,7 +7460,7 @@ type="int" transient="false" volatile="false" value="16843414" value="16843415" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -8362,7 +8373,7 @@ type="int" transient="false" volatile="false" value="16843408" value="16843409" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -8538,7 +8549,7 @@ type="int" transient="false" volatile="false" value="16843412" value="16843413" static="true" final="true" deprecated="not deprecated" Loading @@ -8549,7 +8560,7 @@ type="int" transient="false" volatile="false" value="16843413" value="16843414" static="true" final="true" deprecated="not deprecated" Loading @@ -8560,7 +8571,7 @@ type="int" transient="false" volatile="false" value="16843410" value="16843411" static="true" final="true" deprecated="not deprecated" Loading @@ -8571,7 +8582,7 @@ type="int" transient="false" volatile="false" value="16843411" value="16843412" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -8780,7 +8791,7 @@ type="int" transient="false" volatile="false" value="16843409" value="16843410" static="true" final="true" deprecated="not deprecated" core/res/res/values/attrs_manifest.xml +9 −0 Original line number Diff line number Diff line Loading @@ -781,6 +781,15 @@ represent the minor number. For example for GL 1.2 referring to 0x00000102, the actual value should be set as 0x00010002. --> <attr name="glEsVersion" format="integer"/> <!-- The name of the feature that is being used. --> <attr name="name" /> <!-- Specify whether this feature is required for the application. The default is true, meaning the application requires the feature, and does not want to be installed on devices that don't support it. If you set this to false, then this will not impose a restriction on where the application can be installed. --> <attr name="required" format="boolean" /> </declare-styleable> <!-- The <code>uses-sdk</code> tag describes the SDK features that the Loading core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1150,6 +1150,7 @@ =============================================================== --> <eat-comment /> <public type="attr" name="required" id="0x0101028e" /> <public type="attr" name="accountType" /> <public type="attr" name="contentAuthority" /> <public type="attr" name="userVisible" /> Loading tools/aapt/Command.cpp +44 −0 Original line number Diff line number Diff line Loading @@ -332,9 +332,11 @@ enum { TARGET_SDK_VERSION_ATTR = 0x01010270, TEST_ONLY_ATTR = 0x01010272, DENSITY_ATTR = 0x0101026c, GL_ES_VERSION_ATTR = 0x01010281, SMALL_SCREEN_ATTR = 0x01010284, NORMAL_SCREEN_ATTR = 0x01010285, LARGE_SCREEN_ATTR = 0x01010286, REQUIRED_ATTR = 0x0101028e, }; const char *getComponentName(String8 &pkgName, String8 &componentName) { Loading Loading @@ -520,6 +522,8 @@ int doDump(Bundle* bundle) bool actWidgetReceivers = false; bool actImeService = false; bool actWallpaperService = false; bool specCameraFeature = false; bool hasCameraPermission = false; int targetSdk = 0; int smallScreen = 1; int normalScreen = 1; Loading Loading @@ -706,6 +710,37 @@ int doDump(Bundle* bundle) NORMAL_SCREEN_ATTR, NULL, 1); largeScreen = getIntegerAttribute(tree, LARGE_SCREEN_ATTR, NULL, 1); } else if (tag == "uses-feature") { String8 name = getAttribute(tree, NAME_ATTR, &error); if (error == "") { int req = getIntegerAttribute(tree, REQUIRED_ATTR, NULL, 1); if (name == "android.hardware.camera") { specCameraFeature = true; } printf("uses-feature%s:'%s'\n", req ? "" : "-not-required", name.string()); } else { int vers = getIntegerAttribute(tree, GL_ES_VERSION_ATTR, &error); if (error == "") { printf("uses-gl-es:'0x%x'\n", vers); } } } else if (tag == "uses-permission") { String8 name = getAttribute(tree, NAME_ATTR, &error); if (error == "") { int opt = getIntegerAttribute(tree, REQUIRED_ATTR, NULL, 1); if (name == "android.permission.CAMERA") { hasCameraPermission = true; } printf("uses-permission:'%s'\n", name.string()); } else { fprintf(stderr, "ERROR getting 'android:name' attribute: %s\n", error.string()); goto bail; } } } else if (depth == 3 && withinApplication) { withinActivity = false; Loading Loading @@ -803,6 +838,15 @@ int doDump(Bundle* bundle) } } if (!specCameraFeature && hasCameraPermission) { // For applications that have not explicitly stated their // camera feature requirements, but have requested the camera // permission, we are going to give them compatibility treatment // of requiring the equivalent to original android devices. printf("uses-feature:'android.hardware.camera'\n"); printf("uses-feature:'android.hardware.camera.autofocus'\n"); } if (hasMainActivity) { printf("main\n"); } Loading Loading
api/current.xml +20 −9 Original line number Diff line number Diff line Loading @@ -1663,7 +1663,7 @@ type="int" transient="false" volatile="false" value="16843406" value="16843407" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -2664,7 +2664,7 @@ type="int" transient="false" volatile="false" value="16843407" value="16843408" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -6422,6 +6422,17 @@ visibility="public" > </field> <field name="required" type="int" transient="false" volatile="false" value="16843406" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="resizeable" type="int" transient="false" Loading Loading @@ -7449,7 +7460,7 @@ type="int" transient="false" volatile="false" value="16843414" value="16843415" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -8362,7 +8373,7 @@ type="int" transient="false" volatile="false" value="16843408" value="16843409" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -8538,7 +8549,7 @@ type="int" transient="false" volatile="false" value="16843412" value="16843413" static="true" final="true" deprecated="not deprecated" Loading @@ -8549,7 +8560,7 @@ type="int" transient="false" volatile="false" value="16843413" value="16843414" static="true" final="true" deprecated="not deprecated" Loading @@ -8560,7 +8571,7 @@ type="int" transient="false" volatile="false" value="16843410" value="16843411" static="true" final="true" deprecated="not deprecated" Loading @@ -8571,7 +8582,7 @@ type="int" transient="false" volatile="false" value="16843411" value="16843412" static="true" final="true" deprecated="not deprecated" Loading Loading @@ -8780,7 +8791,7 @@ type="int" transient="false" volatile="false" value="16843409" value="16843410" static="true" final="true" deprecated="not deprecated"
core/res/res/values/attrs_manifest.xml +9 −0 Original line number Diff line number Diff line Loading @@ -781,6 +781,15 @@ represent the minor number. For example for GL 1.2 referring to 0x00000102, the actual value should be set as 0x00010002. --> <attr name="glEsVersion" format="integer"/> <!-- The name of the feature that is being used. --> <attr name="name" /> <!-- Specify whether this feature is required for the application. The default is true, meaning the application requires the feature, and does not want to be installed on devices that don't support it. If you set this to false, then this will not impose a restriction on where the application can be installed. --> <attr name="required" format="boolean" /> </declare-styleable> <!-- The <code>uses-sdk</code> tag describes the SDK features that the Loading
core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1150,6 +1150,7 @@ =============================================================== --> <eat-comment /> <public type="attr" name="required" id="0x0101028e" /> <public type="attr" name="accountType" /> <public type="attr" name="contentAuthority" /> <public type="attr" name="userVisible" /> Loading
tools/aapt/Command.cpp +44 −0 Original line number Diff line number Diff line Loading @@ -332,9 +332,11 @@ enum { TARGET_SDK_VERSION_ATTR = 0x01010270, TEST_ONLY_ATTR = 0x01010272, DENSITY_ATTR = 0x0101026c, GL_ES_VERSION_ATTR = 0x01010281, SMALL_SCREEN_ATTR = 0x01010284, NORMAL_SCREEN_ATTR = 0x01010285, LARGE_SCREEN_ATTR = 0x01010286, REQUIRED_ATTR = 0x0101028e, }; const char *getComponentName(String8 &pkgName, String8 &componentName) { Loading Loading @@ -520,6 +522,8 @@ int doDump(Bundle* bundle) bool actWidgetReceivers = false; bool actImeService = false; bool actWallpaperService = false; bool specCameraFeature = false; bool hasCameraPermission = false; int targetSdk = 0; int smallScreen = 1; int normalScreen = 1; Loading Loading @@ -706,6 +710,37 @@ int doDump(Bundle* bundle) NORMAL_SCREEN_ATTR, NULL, 1); largeScreen = getIntegerAttribute(tree, LARGE_SCREEN_ATTR, NULL, 1); } else if (tag == "uses-feature") { String8 name = getAttribute(tree, NAME_ATTR, &error); if (error == "") { int req = getIntegerAttribute(tree, REQUIRED_ATTR, NULL, 1); if (name == "android.hardware.camera") { specCameraFeature = true; } printf("uses-feature%s:'%s'\n", req ? "" : "-not-required", name.string()); } else { int vers = getIntegerAttribute(tree, GL_ES_VERSION_ATTR, &error); if (error == "") { printf("uses-gl-es:'0x%x'\n", vers); } } } else if (tag == "uses-permission") { String8 name = getAttribute(tree, NAME_ATTR, &error); if (error == "") { int opt = getIntegerAttribute(tree, REQUIRED_ATTR, NULL, 1); if (name == "android.permission.CAMERA") { hasCameraPermission = true; } printf("uses-permission:'%s'\n", name.string()); } else { fprintf(stderr, "ERROR getting 'android:name' attribute: %s\n", error.string()); goto bail; } } } else if (depth == 3 && withinApplication) { withinActivity = false; Loading Loading @@ -803,6 +838,15 @@ int doDump(Bundle* bundle) } } if (!specCameraFeature && hasCameraPermission) { // For applications that have not explicitly stated their // camera feature requirements, but have requested the camera // permission, we are going to give them compatibility treatment // of requiring the equivalent to original android devices. printf("uses-feature:'android.hardware.camera'\n"); printf("uses-feature:'android.hardware.camera.autofocus'\n"); } if (hasMainActivity) { printf("main\n"); } Loading