Merge commit '78c9bb59eb3cfa92e5a13621b1efe5bd8ecbb92b' into eclair-mr2-plus-aosp * commit '78c9bb59eb3cfa92e5a13621b1efe5bd8ecbb92b': Move check for hidden files in the proper method.
This commit is contained in:
@@ -68,10 +68,6 @@ public class JavaResourceFilter implements IZipEntryFilter {
|
|||||||
* @return true if the file should be packaged as standard java resources.
|
* @return true if the file should be packaged as standard java resources.
|
||||||
*/
|
*/
|
||||||
public static boolean checkFileForPackaging(String fileName) {
|
public static boolean checkFileForPackaging(String fileName) {
|
||||||
if (fileName.charAt(0) == '.') { // ignore hidden files.
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
String[] fileSegments = fileName.split("\\.");
|
String[] fileSegments = fileName.split("\\.");
|
||||||
String fileExt = "";
|
String fileExt = "";
|
||||||
if (fileSegments.length > 1) {
|
if (fileSegments.length > 1) {
|
||||||
@@ -87,8 +83,12 @@ public class JavaResourceFilter implements IZipEntryFilter {
|
|||||||
* @param extension the extension of the file (excluding '.')
|
* @param extension the extension of the file (excluding '.')
|
||||||
* @return true if the file should be packaged as standard java resources.
|
* @return true if the file should be packaged as standard java resources.
|
||||||
*/
|
*/
|
||||||
public static boolean checkFileForPackaging(String fileName, String extension) {
|
public static boolean checkFileForPackaging(String fileName, String extension) {
|
||||||
// Note: this method is used by ApkBuilder
|
// 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
|
return "aidl".equalsIgnoreCase(extension) == false && // Aidl files
|
||||||
"java".equalsIgnoreCase(extension) == false && // Java files
|
"java".equalsIgnoreCase(extension) == false && // Java files
|
||||||
"class".equalsIgnoreCase(extension) == false && // Java class files
|
"class".equalsIgnoreCase(extension) == false && // Java class files
|
||||||
|
|||||||
Reference in New Issue
Block a user