From 6d923adf811f7842da77ca4639082f62141afce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20Wi=C5=9Bniewski?= Date: Sun, 29 Aug 2010 22:52:43 +0200 Subject: [PATCH] AXmlResourceParser.getAttributeValue(): always try to use string value first. --- src/brut/androlib/res/decoder/AXmlResourceParser.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/brut/androlib/res/decoder/AXmlResourceParser.java b/src/brut/androlib/res/decoder/AXmlResourceParser.java index 34045459..8fa85d8c 100644 --- a/src/brut/androlib/res/decoder/AXmlResourceParser.java +++ b/src/brut/androlib/res/decoder/AXmlResourceParser.java @@ -306,12 +306,12 @@ public class AXmlResourceParser implements XmlResourceParser { public String getAttributeValue(int index) { int offset = getAttributeOffset(index); - int valueType = m_attributes[offset + ATTRIBUTE_IX_VALUE_TYPE]; - if (valueType == TypedValue.TYPE_STRING) { - int valueString = m_attributes[offset + ATTRIBUTE_IX_VALUE_STRING]; + int valueString = m_attributes[offset + ATTRIBUTE_IX_VALUE_STRING]; + if (valueString != -1) { return AndrolibResources.escapeTextForResXml( m_strings.getString(valueString)); } + int valueType = m_attributes[offset + ATTRIBUTE_IX_VALUE_TYPE]; int valueData = m_attributes[offset + ATTRIBUTE_IX_VALUE_DATA]; if (mAttrDecoder != null) {