AAPT2: Change how we generate Java classes
Previously we would be writing out the Manifest.java file as we processed the AndroidManifest.xml. This would lead to empty Manifest classes if there were no permissions or permission groups defined in the AndroidManifest.xml. This would pose problems for processes that checked for public classes and considered them part of the API (support lib). Now we collect the structure of the Java class in memory before deciding if a file should be created. Change-Id: I6b909f28d74356414c6ef5ad005180d6ea5e44ca
This commit is contained in:
@@ -64,7 +64,7 @@ void AnnotationProcessor::appendNewLine() {
|
||||
mComment << "\n *";
|
||||
}
|
||||
|
||||
void AnnotationProcessor::writeToStream(std::ostream* out, const StringPiece& prefix) {
|
||||
void AnnotationProcessor::writeToStream(std::ostream* out, const StringPiece& prefix) const {
|
||||
if (mHasComments) {
|
||||
std::string result = mComment.str();
|
||||
for (StringPiece line : util::tokenize<char>(result, '\n')) {
|
||||
|
||||
Reference in New Issue
Block a user