From f9e0b264422d086066a9d9deb2118617735e8d65 Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Tue, 3 Nov 2009 10:52:54 -0800 Subject: [PATCH] Move check for hidden files in the proper method. Change-Id: I0a364b118d60aaab259cba2b13edcc2c31c39148 --- .../src/com/android/jarutils/JavaResourceFilter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/jarutils/src/com/android/jarutils/JavaResourceFilter.java b/tools/jarutils/src/com/android/jarutils/JavaResourceFilter.java index 723a21352..867851034 100644 --- a/tools/jarutils/src/com/android/jarutils/JavaResourceFilter.java +++ b/tools/jarutils/src/com/android/jarutils/JavaResourceFilter.java @@ -68,10 +68,6 @@ public class JavaResourceFilter implements IZipEntryFilter { * @return true if the file should be packaged as standard java resources. */ public static boolean checkFileForPackaging(String fileName) { - if (fileName.charAt(0) == '.') { // ignore hidden files. - return false; - } - String[] fileSegments = fileName.split("\\."); String fileExt = ""; if (fileSegments.length > 1) { @@ -87,8 +83,12 @@ public class JavaResourceFilter implements IZipEntryFilter { * @param extension the extension of the file (excluding '.') * @return true if the file should be packaged as standard java resources. */ - public static boolean checkFileForPackaging(String fileName, String extension) { - // Note: this method is used by ApkBuilder + public static boolean checkFileForPackaging(String fileName, String extension) { + // Note: this method is used by com.android.ide.eclipse.adt.internal.build.ApkBuilder + if (fileName.charAt(0) == '.') { // ignore hidden files. + return false; + } + return "aidl".equalsIgnoreCase(extension) == false && // Aidl files "java".equalsIgnoreCase(extension) == false && // Java files "class".equalsIgnoreCase(extension) == false && // Java class files