Loading Android.mk +22 −13 Original line number Diff line number Diff line Loading @@ -413,14 +413,18 @@ framework_docs_LOCAL_INTERMEDIATE_SOURCES := \ $(framework_res_source_path)/android/Manifest.java \ $(framework_res_source_path)/com/android/internal/R.java framework_docs_LOCAL_JAVA_LIBRARIES := \ framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES := \ bouncycastle \ core \ ext \ framework \ mms-common \ telephony-common \ voip-common \ voip-common framework_docs_LOCAL_JAVA_LIBRARIES := \ $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) \ $(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES) framework_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES framework_docs_LOCAL_DROIDDOC_HTML_DIR := docs/html Loading Loading @@ -449,7 +453,12 @@ framework_docs_LOCAL_DROIDDOC_OPTIONS := \ -werror -hide 113 \ -overview $(LOCAL_PATH)/core/java/overview.html framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON) framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \ $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON) framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \ $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR) \ $(foreach lib,$(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES),$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)) framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \ frameworks/base/docs/knowntags.txt Loading Loading @@ -571,11 +580,11 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES) LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES) LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR) LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR) LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) LOCAL_MODULE := api-stubs Loading core/res/res/values/attrs.xml +1 −1 Original line number Diff line number Diff line Loading @@ -3548,7 +3548,7 @@ <attr name="dropDownWidth" /> <!-- Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown". This layout must contain a TextView with the id @android:id/text1 to be populated with the prompt text. --> {@code @android:id/text1} to be populated with the prompt text. --> <attr name="popupPromptView" format="reference" /> <!-- Gravity setting for positioning the currently selected item. --> <attr name="gravity" /> Loading tools/aapt/Resource.cpp +55 −59 Original line number Diff line number Diff line Loading @@ -1568,11 +1568,37 @@ static const char whitespace[] = return whitespace + sizeof(whitespace) - 1 - indent*4; } static status_t fixupSymbol(String16* inoutSymbol) { inoutSymbol->replaceAll('.', '_'); inoutSymbol->replaceAll(':', '_'); return NO_ERROR; static String8 flattenSymbol(const String8& symbol) { String8 result(symbol); ssize_t first; if ((first = symbol.find(":", 0)) >= 0 || (first = symbol.find(".", 0)) >= 0) { size_t size = symbol.size(); char* buf = result.lockBuffer(size); for (size_t i = first; i < size; i++) { if (buf[i] == ':' || buf[i] == '.') { buf[i] = '_'; } } result.unlockBuffer(size); } return result; } static String8 getSymbolPackage(const String8& symbol, const sp<AaptAssets>& assets, bool pub) { ssize_t colon = symbol.find(":", 0); if (colon >= 0) { return String8(symbol.string(), colon); } return pub ? assets->getPackage() : assets->getSymbolsPrivatePackage(); } static String8 getSymbolName(const String8& symbol) { ssize_t colon = symbol.find(":", 0); if (colon >= 0) { return String8(symbol.string() + colon + 1); } return symbol; } static String16 getAttributeComment(const sp<AaptAssets>& assets, Loading Loading @@ -1616,12 +1642,8 @@ static status_t writeLayoutClasses( size_t N = symbols->getNestedSymbols().size(); for (i=0; i<N; i++) { sp<AaptSymbols> nsymbols = symbols->getNestedSymbols().valueAt(i); String16 nclassName16(symbols->getNestedSymbols().keyAt(i)); String8 realClassName(nclassName16); if (fixupSymbol(&nclassName16) != NO_ERROR) { hasErrors = true; } String8 nclassName(nclassName16); String8 realClassName(symbols->getNestedSymbols().keyAt(i)); String8 nclassName(flattenSymbol(realClassName)); SortedVector<uint32_t> idents; Vector<uint32_t> origOrder; Loading Loading @@ -1711,13 +1733,11 @@ static status_t writeLayoutClasses( } comment = String16(comment.string(), p-comment.string()); } String16 name(name8); fixupSymbol(&name); fprintf(fp, "%s <tr><td><code>{@link #%s_%s %s:%s}</code></td><td>%s</td></tr>\n", indentStr, nclassName.string(), String8(name).string(), assets->getPackage().string(), String8(name).string(), flattenSymbol(name8).string(), getSymbolPackage(name8, assets, true).string(), getSymbolName(name8).string(), String8(comment).string()); } } Loading @@ -1731,11 +1751,9 @@ static status_t writeLayoutClasses( if (!publicFlags.itemAt(a) && !includePrivate) { continue; } String16 name(sym.name); fixupSymbol(&name); fprintf(fp, "%s @see #%s_%s\n", indentStr, nclassName.string(), String8(name).string()); flattenSymbol(sym.name).string()); } } fprintf(fp, "%s */\n", getIndentSpace(indent)); Loading Loading @@ -1778,10 +1796,6 @@ static status_t writeLayoutClasses( } else { getAttributeComment(assets, name8, &typeComment); } String16 name(name8); if (fixupSymbol(&name) != NO_ERROR) { hasErrors = true; } uint32_t typeSpecFlags = 0; String16 name16(sym.name); Loading @@ -1808,9 +1822,8 @@ static status_t writeLayoutClasses( "%s <p>This symbol is the offset where the {@link %s.R.attr#%s}\n" "%s attribute's value can be found in the {@link #%s} array.\n", indentStr, pub ? assets->getPackage().string() : assets->getSymbolsPrivatePackage().string(), String8(name).string(), getSymbolPackage(name8, assets, pub).string(), getSymbolName(name8).string(), indentStr, nclassName.string()); } if (typeComment.size() > 0) { Loading @@ -1823,18 +1836,19 @@ static status_t writeLayoutClasses( if (comment.size() > 0) { if (pub) { fprintf(fp, "%s <p>This corresponds to the global attribute" "%s <p>This corresponds to the global attribute\n" "%s resource symbol {@link %s.R.attr#%s}.\n", indentStr, indentStr, assets->getPackage().string(), String8(name).string()); getSymbolPackage(name8, assets, true).string(), getSymbolName(name8).string()); } else { fprintf(fp, "%s <p>This is a private symbol.\n", indentStr); } } fprintf(fp, "%s @attr name %s:%s\n", indentStr, "android", String8(name).string()); getSymbolPackage(name8, assets, pub).string(), getSymbolName(name8).string()); fprintf(fp, "%s*/\n", indentStr); if (deprecated) { fprintf(fp, "%s@Deprecated\n", indentStr); Loading @@ -1842,7 +1856,7 @@ static status_t writeLayoutClasses( fprintf(fp, "%spublic static final int %s_%s = %d;\n", indentStr, nclassName.string(), String8(name).string(), (int)pos); flattenSymbol(name8).string(), (int)pos); } } } Loading @@ -1865,12 +1879,8 @@ static status_t writeTextLayoutClasses( size_t N = symbols->getNestedSymbols().size(); for (i=0; i<N; i++) { sp<AaptSymbols> nsymbols = symbols->getNestedSymbols().valueAt(i); String16 nclassName16(symbols->getNestedSymbols().keyAt(i)); String8 realClassName(nclassName16); if (fixupSymbol(&nclassName16) != NO_ERROR) { hasErrors = true; } String8 nclassName(nclassName16); String8 realClassName(symbols->getNestedSymbols().keyAt(i)); String8 nclassName(flattenSymbol(realClassName)); SortedVector<uint32_t> idents; Vector<uint32_t> origOrder; Loading Loading @@ -1930,10 +1940,6 @@ static status_t writeTextLayoutClasses( } else { getAttributeComment(assets, name8, &typeComment); } String16 name(name8); if (fixupSymbol(&name) != NO_ERROR) { hasErrors = true; } uint32_t typeSpecFlags = 0; String16 name16(sym.name); Loading @@ -1948,7 +1954,7 @@ static status_t writeTextLayoutClasses( fprintf(fp, "int styleable %s_%s %d\n", nclassName.string(), String8(name).string(), (int)pos); flattenSymbol(name8).string(), (int)pos); } } } Loading Loading @@ -1982,10 +1988,7 @@ static status_t writeSymbolClass( if (!assets->isJavaSymbol(sym, includePrivate)) { continue; } String16 name(sym.name); if (fixupSymbol(&name) != NO_ERROR) { return UNKNOWN_ERROR; } String8 name8(sym.name); String16 comment(sym.comment); bool haveComment = false; bool deprecated = false; Loading Loading @@ -2026,7 +2029,7 @@ static status_t writeSymbolClass( } fprintf(fp, id_format, getIndentSpace(indent), String8(name).string(), (int)sym.int32Val); flattenSymbol(name8).string(), (int)sym.int32Val); } for (i=0; i<N; i++) { Loading @@ -2037,10 +2040,7 @@ static status_t writeSymbolClass( if (!assets->isJavaSymbol(sym, includePrivate)) { continue; } String16 name(sym.name); if (fixupSymbol(&name) != NO_ERROR) { return UNKNOWN_ERROR; } String8 name8(sym.name); String16 comment(sym.comment); bool deprecated = false; if (comment.size() > 0) { Loading @@ -2063,7 +2063,7 @@ static status_t writeSymbolClass( } fprintf(fp, "%spublic static final String %s=\"%s\";\n", getIndentSpace(indent), String8(name).string(), sym.stringVal.string()); flattenSymbol(name8).string(), sym.stringVal.string()); } sp<AaptSymbols> styleableSymbols; Loading Loading @@ -2112,14 +2112,10 @@ static status_t writeTextSymbolClass( continue; } String16 name(sym.name); if (fixupSymbol(&name) != NO_ERROR) { return UNKNOWN_ERROR; } String8 name8(sym.name); fprintf(fp, "int %s %s 0x%08x\n", className.string(), String8(name).string(), (int)sym.int32Val); flattenSymbol(name8).string(), (int)sym.int32Val); } N = symbols->getNestedSymbols().size(); Loading Loading
Android.mk +22 −13 Original line number Diff line number Diff line Loading @@ -413,14 +413,18 @@ framework_docs_LOCAL_INTERMEDIATE_SOURCES := \ $(framework_res_source_path)/android/Manifest.java \ $(framework_res_source_path)/com/android/internal/R.java framework_docs_LOCAL_JAVA_LIBRARIES := \ framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES := \ bouncycastle \ core \ ext \ framework \ mms-common \ telephony-common \ voip-common \ voip-common framework_docs_LOCAL_JAVA_LIBRARIES := \ $(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) \ $(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES) framework_docs_LOCAL_MODULE_CLASS := JAVA_LIBRARIES framework_docs_LOCAL_DROIDDOC_HTML_DIR := docs/html Loading Loading @@ -449,7 +453,12 @@ framework_docs_LOCAL_DROIDDOC_OPTIONS := \ -werror -hide 113 \ -overview $(LOCAL_PATH)/core/java/overview.html framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON) framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR:= \ $(call intermediates-dir-for,JAVA_LIBRARIES,framework,,COMMON) framework_docs_LOCAL_ADDITIONAL_JAVA_DIR:= \ $(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR) \ $(foreach lib,$(FRAMEWORKS_SUPPORT_JAVA_LIBRARIES),$(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)) framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES := \ frameworks/base/docs/knowntags.txt Loading Loading @@ -571,11 +580,11 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES:=$(framework_docs_LOCAL_API_CHECK_SRC_FILES) LOCAL_INTERMEDIATE_SOURCES:=$(framework_docs_LOCAL_INTERMEDIATE_SOURCES) LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_JAVA_LIBRARIES) LOCAL_JAVA_LIBRARIES:=$(framework_docs_LOCAL_API_CHECK_JAVA_LIBRARIES) LOCAL_MODULE_CLASS:=$(framework_docs_LOCAL_MODULE_CLASS) LOCAL_DROIDDOC_SOURCE_PATH:=$(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH) LOCAL_DROIDDOC_HTML_DIR:=$(framework_docs_LOCAL_DROIDDOC_HTML_DIR) LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_ADDITIONAL_JAVA_DIR) LOCAL_ADDITIONAL_JAVA_DIR:=$(framework_docs_LOCAL_API_CHECK_ADDITIONAL_JAVA_DIR) LOCAL_ADDITIONAL_DEPENDENCIES:=$(framework_docs_LOCAL_ADDITIONAL_DEPENDENCIES) LOCAL_MODULE := api-stubs Loading
core/res/res/values/attrs.xml +1 −1 Original line number Diff line number Diff line Loading @@ -3548,7 +3548,7 @@ <attr name="dropDownWidth" /> <!-- Reference to a layout to use for displaying a prompt in the dropdown for spinnerMode="dropdown". This layout must contain a TextView with the id @android:id/text1 to be populated with the prompt text. --> {@code @android:id/text1} to be populated with the prompt text. --> <attr name="popupPromptView" format="reference" /> <!-- Gravity setting for positioning the currently selected item. --> <attr name="gravity" /> Loading
tools/aapt/Resource.cpp +55 −59 Original line number Diff line number Diff line Loading @@ -1568,11 +1568,37 @@ static const char whitespace[] = return whitespace + sizeof(whitespace) - 1 - indent*4; } static status_t fixupSymbol(String16* inoutSymbol) { inoutSymbol->replaceAll('.', '_'); inoutSymbol->replaceAll(':', '_'); return NO_ERROR; static String8 flattenSymbol(const String8& symbol) { String8 result(symbol); ssize_t first; if ((first = symbol.find(":", 0)) >= 0 || (first = symbol.find(".", 0)) >= 0) { size_t size = symbol.size(); char* buf = result.lockBuffer(size); for (size_t i = first; i < size; i++) { if (buf[i] == ':' || buf[i] == '.') { buf[i] = '_'; } } result.unlockBuffer(size); } return result; } static String8 getSymbolPackage(const String8& symbol, const sp<AaptAssets>& assets, bool pub) { ssize_t colon = symbol.find(":", 0); if (colon >= 0) { return String8(symbol.string(), colon); } return pub ? assets->getPackage() : assets->getSymbolsPrivatePackage(); } static String8 getSymbolName(const String8& symbol) { ssize_t colon = symbol.find(":", 0); if (colon >= 0) { return String8(symbol.string() + colon + 1); } return symbol; } static String16 getAttributeComment(const sp<AaptAssets>& assets, Loading Loading @@ -1616,12 +1642,8 @@ static status_t writeLayoutClasses( size_t N = symbols->getNestedSymbols().size(); for (i=0; i<N; i++) { sp<AaptSymbols> nsymbols = symbols->getNestedSymbols().valueAt(i); String16 nclassName16(symbols->getNestedSymbols().keyAt(i)); String8 realClassName(nclassName16); if (fixupSymbol(&nclassName16) != NO_ERROR) { hasErrors = true; } String8 nclassName(nclassName16); String8 realClassName(symbols->getNestedSymbols().keyAt(i)); String8 nclassName(flattenSymbol(realClassName)); SortedVector<uint32_t> idents; Vector<uint32_t> origOrder; Loading Loading @@ -1711,13 +1733,11 @@ static status_t writeLayoutClasses( } comment = String16(comment.string(), p-comment.string()); } String16 name(name8); fixupSymbol(&name); fprintf(fp, "%s <tr><td><code>{@link #%s_%s %s:%s}</code></td><td>%s</td></tr>\n", indentStr, nclassName.string(), String8(name).string(), assets->getPackage().string(), String8(name).string(), flattenSymbol(name8).string(), getSymbolPackage(name8, assets, true).string(), getSymbolName(name8).string(), String8(comment).string()); } } Loading @@ -1731,11 +1751,9 @@ static status_t writeLayoutClasses( if (!publicFlags.itemAt(a) && !includePrivate) { continue; } String16 name(sym.name); fixupSymbol(&name); fprintf(fp, "%s @see #%s_%s\n", indentStr, nclassName.string(), String8(name).string()); flattenSymbol(sym.name).string()); } } fprintf(fp, "%s */\n", getIndentSpace(indent)); Loading Loading @@ -1778,10 +1796,6 @@ static status_t writeLayoutClasses( } else { getAttributeComment(assets, name8, &typeComment); } String16 name(name8); if (fixupSymbol(&name) != NO_ERROR) { hasErrors = true; } uint32_t typeSpecFlags = 0; String16 name16(sym.name); Loading @@ -1808,9 +1822,8 @@ static status_t writeLayoutClasses( "%s <p>This symbol is the offset where the {@link %s.R.attr#%s}\n" "%s attribute's value can be found in the {@link #%s} array.\n", indentStr, pub ? assets->getPackage().string() : assets->getSymbolsPrivatePackage().string(), String8(name).string(), getSymbolPackage(name8, assets, pub).string(), getSymbolName(name8).string(), indentStr, nclassName.string()); } if (typeComment.size() > 0) { Loading @@ -1823,18 +1836,19 @@ static status_t writeLayoutClasses( if (comment.size() > 0) { if (pub) { fprintf(fp, "%s <p>This corresponds to the global attribute" "%s <p>This corresponds to the global attribute\n" "%s resource symbol {@link %s.R.attr#%s}.\n", indentStr, indentStr, assets->getPackage().string(), String8(name).string()); getSymbolPackage(name8, assets, true).string(), getSymbolName(name8).string()); } else { fprintf(fp, "%s <p>This is a private symbol.\n", indentStr); } } fprintf(fp, "%s @attr name %s:%s\n", indentStr, "android", String8(name).string()); getSymbolPackage(name8, assets, pub).string(), getSymbolName(name8).string()); fprintf(fp, "%s*/\n", indentStr); if (deprecated) { fprintf(fp, "%s@Deprecated\n", indentStr); Loading @@ -1842,7 +1856,7 @@ static status_t writeLayoutClasses( fprintf(fp, "%spublic static final int %s_%s = %d;\n", indentStr, nclassName.string(), String8(name).string(), (int)pos); flattenSymbol(name8).string(), (int)pos); } } } Loading @@ -1865,12 +1879,8 @@ static status_t writeTextLayoutClasses( size_t N = symbols->getNestedSymbols().size(); for (i=0; i<N; i++) { sp<AaptSymbols> nsymbols = symbols->getNestedSymbols().valueAt(i); String16 nclassName16(symbols->getNestedSymbols().keyAt(i)); String8 realClassName(nclassName16); if (fixupSymbol(&nclassName16) != NO_ERROR) { hasErrors = true; } String8 nclassName(nclassName16); String8 realClassName(symbols->getNestedSymbols().keyAt(i)); String8 nclassName(flattenSymbol(realClassName)); SortedVector<uint32_t> idents; Vector<uint32_t> origOrder; Loading Loading @@ -1930,10 +1940,6 @@ static status_t writeTextLayoutClasses( } else { getAttributeComment(assets, name8, &typeComment); } String16 name(name8); if (fixupSymbol(&name) != NO_ERROR) { hasErrors = true; } uint32_t typeSpecFlags = 0; String16 name16(sym.name); Loading @@ -1948,7 +1954,7 @@ static status_t writeTextLayoutClasses( fprintf(fp, "int styleable %s_%s %d\n", nclassName.string(), String8(name).string(), (int)pos); flattenSymbol(name8).string(), (int)pos); } } } Loading Loading @@ -1982,10 +1988,7 @@ static status_t writeSymbolClass( if (!assets->isJavaSymbol(sym, includePrivate)) { continue; } String16 name(sym.name); if (fixupSymbol(&name) != NO_ERROR) { return UNKNOWN_ERROR; } String8 name8(sym.name); String16 comment(sym.comment); bool haveComment = false; bool deprecated = false; Loading Loading @@ -2026,7 +2029,7 @@ static status_t writeSymbolClass( } fprintf(fp, id_format, getIndentSpace(indent), String8(name).string(), (int)sym.int32Val); flattenSymbol(name8).string(), (int)sym.int32Val); } for (i=0; i<N; i++) { Loading @@ -2037,10 +2040,7 @@ static status_t writeSymbolClass( if (!assets->isJavaSymbol(sym, includePrivate)) { continue; } String16 name(sym.name); if (fixupSymbol(&name) != NO_ERROR) { return UNKNOWN_ERROR; } String8 name8(sym.name); String16 comment(sym.comment); bool deprecated = false; if (comment.size() > 0) { Loading @@ -2063,7 +2063,7 @@ static status_t writeSymbolClass( } fprintf(fp, "%spublic static final String %s=\"%s\";\n", getIndentSpace(indent), String8(name).string(), sym.stringVal.string()); flattenSymbol(name8).string(), sym.stringVal.string()); } sp<AaptSymbols> styleableSymbols; Loading Loading @@ -2112,14 +2112,10 @@ static status_t writeTextSymbolClass( continue; } String16 name(sym.name); if (fixupSymbol(&name) != NO_ERROR) { return UNKNOWN_ERROR; } String8 name8(sym.name); fprintf(fp, "int %s %s 0x%08x\n", className.string(), String8(name).string(), (int)sym.int32Val); flattenSymbol(name8).string(), (int)sym.int32Val); } N = symbols->getNestedSymbols().size(); Loading