am a1d08886: Merge "Only output proguard keep for nonempty attribute name in the AndroidManifest.xml." into eclair
Merge commit 'a1d08886ec8549878ad16c19754a3239706fb61b' into eclair-plus-aosp * commit 'a1d08886ec8549878ad16c19754a3239706fb61b': Only output proguard keep for nonempty attribute name in the AndroidManifest.xml.
This commit is contained in:
@@ -1745,31 +1745,33 @@ writeProguardForAndroidManifest(ProguardKeepSet* keep, const sp<AaptAssets>& ass
|
||||
fprintf(stderr, "ERROR: %s\n", error.string());
|
||||
return -1;
|
||||
}
|
||||
// asdf --> package.asdf
|
||||
// .asdf .a.b --> package.asdf package.a.b
|
||||
// asdf.adsf --> asdf.asdf
|
||||
String8 rule("-keep class ");
|
||||
const char* p = name.string();
|
||||
const char* q = strchr(p, '.');
|
||||
if (p == q) {
|
||||
rule += pkg;
|
||||
rule += name;
|
||||
} else if (q == NULL) {
|
||||
rule += pkg;
|
||||
rule += ".";
|
||||
rule += name;
|
||||
} else {
|
||||
rule += name;
|
||||
if (name.length() > 0) {
|
||||
// asdf --> package.asdf
|
||||
// .asdf .a.b --> package.asdf package.a.b
|
||||
// asdf.adsf --> asdf.asdf
|
||||
String8 rule("-keep class ");
|
||||
const char* p = name.string();
|
||||
const char* q = strchr(p, '.');
|
||||
if (p == q) {
|
||||
rule += pkg;
|
||||
rule += name;
|
||||
} else if (q == NULL) {
|
||||
rule += pkg;
|
||||
rule += ".";
|
||||
rule += name;
|
||||
} else {
|
||||
rule += name;
|
||||
}
|
||||
|
||||
String8 location = tag;
|
||||
location += " ";
|
||||
location += assFile->getSourceFile();
|
||||
char lineno[20];
|
||||
sprintf(lineno, ":%d", tree.getLineNumber());
|
||||
location += lineno;
|
||||
|
||||
keep->add(rule, location);
|
||||
}
|
||||
|
||||
String8 location = tag;
|
||||
location += " ";
|
||||
location += assFile->getSourceFile();
|
||||
char lineno[20];
|
||||
sprintf(lineno, ":%d", tree.getLineNumber());
|
||||
location += lineno;
|
||||
|
||||
keep->add(rule, location);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user