fixing system. fixes #8

This commit is contained in:
Connor Tumbleson 2012-09-01 23:46:26 -05:00
parent 38ed873aa3
commit 24a66fdbe1
5 changed files with 12 additions and 9 deletions

View File

@ -215,7 +215,7 @@ public class Main {
"Copyright 2010 Ryszard Wiśniewski <brut.alll@gmail.com>\n" +
"with smali v" + ApktoolProperties.get("smaliVersion") +
", and baksmali v" + ApktoolProperties.get("baksmaliVersion") + "\n" +
"Updated by iBotPeaches (@iBotPeaches)\n" +
"Updated by iBotPeaches <connor.tumbleson@gmail.com> \n" +
"Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n" +
"\n" +
"Usage: apktool [-q|--quiet OR -v|--verbose] COMMAND [...]\n" +

View File

@ -48,9 +48,12 @@ public class ResReferenceValue extends ResIntValue {
spec.hasDefaultResource() &&
spec.getDefaultResource().getValue() instanceof ResIdValue;
return
(mTheme ? '?' : '@') +
(newId ? "+" : "") +
/* generate the beginning to fix @android */
String mStart = (mTheme ? '?' : '@') + (newId ? "+" : "");
// mStart = mStart.replace("@android", "@*android");
/* now dump back */
return mStart +
spec.getFullName(mPackage,
mTheme && spec.getType().getName().equals("attr"));
}

View File

@ -41,18 +41,18 @@ public abstract class ResScalarValue extends ResValue
if (mRawValue != null) {
return mRawValue;
}
return encodeAsResXml();
return encodeAsResXml().replace("@android:", "@*android:");
}
public String encodeAsResXmlItemValue() throws AndrolibException {
return encodeAsResXmlValue();
return encodeAsResXmlValue().replace("@android:", "@*android:");
}
public String encodeAsResXmlValue() throws AndrolibException {
if (mRawValue != null) {
return mRawValue;
}
return encodeAsResXmlValueExt();
return encodeAsResXmlValueExt().replace("@android:", "@*android:");
}
public String encodeAsResXmlValueExt() throws AndrolibException {

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="test_reference1">@string/test1</string>
<string name="test_reference2">@android:string/ok</string>
<string name="test_reference2">@*android:string/ok</string>
<string name="test_reference3">?android:textStyle</string>
</resources>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<View xmlns:android="http://schemas.android.com/apk/res/android"
test1="@string/test1"
test2="@android:string/ok"
test2="@*android:string/ok"
test3="?android:textStyle"
/>