Fix NPE in layoutopt when trying to open non-XML files.

Change-Id: I59900c35996ce4465e2ecfd2eb26a19e3fa66403
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 abfd5ea..0275aa0 100644
--- a/tools/layoutopt/app/src/com/android/layoutopt/cli/Main.java
+++ b/tools/layoutopt/app/src/com/android/layoutopt/cli/Main.java
@@ -51,7 +51,7 @@
         for (File file : files) {
             if (file.isFile() && file.getName().endsWith(".xml")) {
                 analyze(analyzer, file);
-            } else {
+            } else if (file.isDirectory()) {
                 analyzeFiles(file.listFiles());
             }
         }