diff options
author | Xavier Ducrohet <xav@google.com> | 2012-03-01 17:45:07 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-01 17:45:07 -0800 |
commit | 8e700cd45398cabff12e16ee535d02933c0d3220 (patch) | |
tree | 85de646ad4f5e85e844d086ab4fa82502474dc41 | |
parent | f49f01b5cc0ca90c6a87bcd634d34e19b0e2a071 (diff) | |
parent | c266409db79aaa35b057f6fe2c045da8e2d8c051 (diff) | |
download | sdk-8e700cd45398cabff12e16ee535d02933c0d3220.zip sdk-8e700cd45398cabff12e16ee535d02933c0d3220.tar.gz sdk-8e700cd45398cabff12e16ee535d02933c0d3220.tar.bz2 |
Merge "Remove R.attr resources from UnusedResource detector (26174)"
-rw-r--r-- | lint/libs/lint_checks/src/com/android/tools/lint/checks/UnusedResourceDetector.java | 7 |
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); } } |