aboutsummaryrefslogtreecommitdiffstats
path: root/sdk_common
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2012-11-02 08:00:47 -0700
committerTor Norbye <tnorbye@google.com>2012-11-02 08:00:47 -0700
commit024076c32fe33d951b6bc89f064f2da85985693f (patch)
treef6c19d1faa98b5aab8ed9b139d8145f4b4eb16ed /sdk_common
parent72eb6932b995d9627afd2659e9567ad84918047e (diff)
downloadsdk-024076c32fe33d951b6bc89f064f2da85985693f.zip
sdk-024076c32fe33d951b6bc89f064f2da85985693f.tar.gz
sdk-024076c32fe33d951b6bc89f064f2da85985693f.tar.bz2
39213: Refreshing resources fails with "Error: name expected"
Change-Id: I6cfe252a830e55da5135b17964fc746db2de8964
Diffstat (limited to 'sdk_common')
-rw-r--r--sdk_common/src/com/android/ide/common/resources/SingleResourceFile.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/sdk_common/src/com/android/ide/common/resources/SingleResourceFile.java b/sdk_common/src/com/android/ide/common/resources/SingleResourceFile.java
index eb643f6..8e394d3 100644
--- a/sdk_common/src/com/android/ide/common/resources/SingleResourceFile.java
+++ b/sdk_common/src/com/android/ide/common/resources/SingleResourceFile.java
@@ -16,12 +16,15 @@
package com.android.ide.common.resources;
+import static com.android.SdkConstants.DOT_XML;
+
import com.android.ide.common.rendering.api.DensityBasedResourceValue;
import com.android.ide.common.rendering.api.ResourceValue;
import com.android.ide.common.resources.configuration.DensityQualifier;
import com.android.io.IAbstractFile;
import com.android.resources.FolderTypeRelationship;
import com.android.resources.ResourceType;
+import com.android.utils.SdkUtils;
import java.util.Collection;
import java.util.List;
@@ -150,8 +153,8 @@ public class SingleResourceFile extends ResourceFile {
* @return true if parsing succeeds and false if it fails
*/
private boolean validateAttributes(ScanningContext context) {
- // We only need to check if it's a non-framework file
- if (!isFramework()) {
+ // We only need to check if it's a non-framework file (and an XML file; skip .png's)
+ if (!isFramework() && SdkUtils.endsWith(getFile().getName(), DOT_XML)) {
ValidatingResourceParser parser = new ValidatingResourceParser(context, false);
try {
IAbstractFile file = getFile();