code: public static boolean checkFileForPackaging(String fileName, String extension) {
          // ignore hidden files and backup files
          if (fileName.charAt(0) == '.' || fileName.charAt(fileName.length()-1) == '~') {
              return false;
          }
  
          return !"aidl".equalsIgnoreCase(extension) &&           // Aidl files
                  !"rs".equalsIgnoreCase(extension) &&            // RenderScript files
                  !"fs".equalsIgnoreCase(extension) &&            // FilterScript files
                  !"rsh".equalsIgnoreCase(extension) &&           // RenderScript header files
                  !"d".equalsIgnoreCase(extension) &&             // Dependency files
                  !"java".equalsIgnoreCase(extension) &&          // Java files
                  !"scala".equalsIgnoreCase(extension) &&         // Scala files
                  !"class".equalsIgnoreCase(extension) &&         // Java class files
                  !"scc".equalsIgnoreCase(extension) &&           // VisualSourceSafe
                  !"swp".equalsIgnoreCase(extension) &&           // vi swap file
                  !"thumbs.db".equalsIgnoreCase(fileName) &&      // image index file
                  !"picasa.ini".equalsIgnoreCase(fileName) &&     // image index file
                  !"package.html".equalsIgnoreCase(fileName) &&   // Javadoc
                  !"overview.html".equalsIgnoreCase(fileName);    // Javadoc
      }
docs: Checks a file to make sure it should be packaged as standard resources.
  @param fileName the name of the file (including extension)
  @param extension the extension of the file (excluding '.')
  @return true if the file should be packaged as standard java resources.