diff options
author | Romain Guy <romainguy@android.com> | 2009-10-05 12:08:48 -0700 |
---|---|---|
committer | Romain Guy <romainguy@android.com> | 2009-10-05 12:08:48 -0700 |
commit | c7bc616f3bdab0faf8e4eb1befcef83ea0a6d2cb (patch) | |
tree | 65148bdaefab655b298e6553ecba27c235af1f23 /layoutopt/app/src | |
parent | 7055162c76d2718034f3dd47684de470c9e9fb4d (diff) | |
download | sdk-c7bc616f3bdab0faf8e4eb1befcef83ea0a6d2cb.zip sdk-c7bc616f3bdab0faf8e4eb1befcef83ea0a6d2cb.tar.gz sdk-c7bc616f3bdab0faf8e4eb1befcef83ea0a6d2cb.tar.bz2 |
Only process XML files in layoutopt.
Change-Id: I847109409601ccfbb10abff3b9972afdb3032821
Diffstat (limited to 'layoutopt/app/src')
-rw-r--r-- | layoutopt/app/src/com/android/layoutopt/cli/Main.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layoutopt/app/src/com/android/layoutopt/cli/Main.java b/layoutopt/app/src/com/android/layoutopt/cli/Main.java index 9b3b9aa..abfd5ea 100644 --- a/layoutopt/app/src/com/android/layoutopt/cli/Main.java +++ b/layoutopt/app/src/com/android/layoutopt/cli/Main.java @@ -49,7 +49,7 @@ public class Main { private static void analyzeFiles(File[] files) { LayoutAnalyzer analyzer = new LayoutAnalyzer(); for (File file : files) { - if (file.isFile()) { + if (file.isFile() && file.getName().endsWith(".xml")) { analyze(analyzer, file); } else { analyzeFiles(file.listFiles()); @@ -95,7 +95,7 @@ public class Main { List<File> files = new ArrayList<File>(); for (String path : args) { File file = new File(path); - if (file.exists()) { + if (file.exists() && (file.isDirectory() || file.getName().endsWith(".xml"))) { files.add(file); } } |