aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/DataValueFileWithIds.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-07-14 22:31:10 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2016-07-15 13:31:04 +0000
commit3b25028750dd7a6df6777f6c70c1feae9063a630 (patch)
treeed88d83b83b6fad418199d48c146a27e35fa0782 /src/tools/android/java/com/google/devtools/build/android/DataValueFileWithIds.java
parente629537510a297b587d7204549dd2aae9222728e (diff)
Record and propagate namespaces from the <resources> element correctly.
* Reduces the size of merged values.xml * Improves correctness of merged xml Sadly, this is also backwards compatible by allowing multiple definitions of a prefix with different namespaces. Will be cleaned up after transition. -- MOS_MIGRATED_REVID=127481147
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/DataValueFileWithIds.java')
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/DataValueFileWithIds.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/DataValueFileWithIds.java b/src/tools/android/java/com/google/devtools/build/android/DataValueFileWithIds.java
index 372e9dd989..9e6cc197c5 100644
--- a/src/tools/android/java/com/google/devtools/build/android/DataValueFileWithIds.java
+++ b/src/tools/android/java/com/google/devtools/build/android/DataValueFileWithIds.java
@@ -13,20 +13,17 @@
// limitations under the License.
package com.google.devtools.build.android;
+import com.android.SdkConstants;
+import com.android.resources.ResourceType;
import com.google.common.collect.ImmutableSet;
import com.google.devtools.build.android.ParsedAndroidData.KeyValueConsumer;
import com.google.devtools.build.android.xml.IdXmlResourceValue;
-
-import com.android.SdkConstants;
-import com.android.resources.ResourceType;
-
import java.io.BufferedInputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Iterator;
-
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
@@ -78,7 +75,7 @@ public class DataValueFileWithIds {
for (String id : idResources) {
combiningConsumer.consume(
fqnFactory.create(ResourceType.ID, id),
- DataResourceXml.of(source, IdXmlResourceValue.of()));
+ DataResourceXml.createWithNoNamespace(source, IdXmlResourceValue.of()));
}
}