aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lint/libs/lint_checks/src/com/android/tools/lint/checks/UnusedResourceDetector.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/lint/libs/lint_checks/src/com/android/tools/lint/checks/UnusedResourceDetector.java b/lint/libs/lint_checks/src/com/android/tools/lint/checks/UnusedResourceDetector.java
index a5ae165..49fdab3 100644
--- a/lint/libs/lint_checks/src/com/android/tools/lint/checks/UnusedResourceDetector.java
+++ b/lint/libs/lint_checks/src/com/android/tools/lint/checks/UnusedResourceDetector.java
@@ -178,11 +178,12 @@ public class UnusedResourceDetector extends ResourceXmlDetector implements Detec
mReferences = null;
mDeclarations = null;
- // Remove styles: they may be used
+ // Remove styles and attributes: they may be used, analysis isn't complete for these
List<String> styles = new ArrayList<String>();
for (String resource : unused) {
- // R.style.x, R.styleable.x
- if (resource.startsWith("R.style")) { //$NON-NLS-1$
+ // R.style.x, R.styleable.x, R.attr
+ if (resource.startsWith("R.style") //$NON-NLS-1$
+ || resource.startsWith("R.attr")) { //$NON-NLS-1$
styles.add(resource);
}
}