From 06d3ec157ee7bebbf550924af267ee168336e085 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 5 Oct 2009 12:08:48 -0700 Subject: [PATCH] Only process XML files in layoutopt. Change-Id: I847109409601ccfbb10abff3b9972afdb3032821 --- tools/layoutopt/app/src/com/android/layoutopt/cli/Main.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/layoutopt/app/src/com/android/layoutopt/cli/Main.java b/tools/layoutopt/app/src/com/android/layoutopt/cli/Main.java index 9b3b9aade..abfd5ea6c 100644 --- a/tools/layoutopt/app/src/com/android/layoutopt/cli/Main.java +++ b/tools/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 files = new ArrayList(); for (String path : args) { File file = new File(path); - if (file.exists()) { + if (file.exists() && (file.isDirectory() || file.getName().endsWith(".xml"))) { files.add(file); } }