Removed Mimetype.isBlocked and all usages.

Fixes b/11016967.

Change-Id: Ic85b89c3c82a39c511cedb0f938ed9286a1470af
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 00063d8..d476d9d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -227,8 +227,6 @@
     <string name="download_again">Download again</string>
     <!-- Dialog box title [CHAR LIMIT=30] -->
     <string name="more_info_attachment">Info</string>
-    <!-- Dialog box message, displayed when we block downloading an attachment due to security concerns. [CHAR LIMIT=200]-->
-    <string name="attachment_type_blocked">Unfortunately, you can\'t save or open this type of attachment.</string>
     <!-- Dialog box message, displayed when we could not view an attachment. [CHAR LIMIT=200]-->
     <string name="no_application_found">No app can open this attachment for viewing.</string>
     <!-- Dialog box title. [CHAR LIMIT=30] -->
diff --git a/src/com/android/mail/browse/MessageAttachmentBar.java b/src/com/android/mail/browse/MessageAttachmentBar.java
index cfcbb34..a1cfe12 100644
--- a/src/com/android/mail/browse/MessageAttachmentBar.java
+++ b/src/com/android/mail/browse/MessageAttachmentBar.java
@@ -232,16 +232,6 @@
 
                 action = null;
             }
-            // If the mimetype is blocked, show the info dialog
-            else if (MimeType.isBlocked(mAttachment.getContentType())) {
-                AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
-                int dialogMessage = R.string.attachment_type_blocked;
-                builder.setTitle(R.string.more_info_attachment)
-                       .setMessage(dialogMessage)
-                       .show();
-
-                action = "attachment_bar_blocked";
-            }
             // If we can install, install.
             else if (MimeType.isInstallable(mAttachment.getContentType())) {
                 // Save to external because the package manager only handles
diff --git a/src/com/android/mail/providers/Attachment.java b/src/com/android/mail/providers/Attachment.java
index 7ba8399..6da871d 100644
--- a/src/com/android/mail/providers/Attachment.java
+++ b/src/com/android/mail/providers/Attachment.java
@@ -412,7 +412,7 @@
     }
 
     public boolean canSave() {
-        return !isSavedToExternal() && !isInstallable() && !MimeType.isBlocked(getContentType());
+        return !isSavedToExternal() && !isInstallable();
     }
 
     public boolean canShare() {
diff --git a/src/com/android/mail/utils/MimeType.java b/src/com/android/mail/utils/MimeType.java
index ab2c6e4..db5ffd1 100644
--- a/src/com/android/mail/utils/MimeType.java
+++ b/src/com/android/mail/utils/MimeType.java
@@ -45,9 +45,6 @@
             "message/rfc822", "application/eml");
     public static final String EML_ATTACHMENT_CONTENT_TYPE = "message/rfc822";
     private static final String NULL_ATTACHMENT_CONTENT_TYPE = "null";
-    private static final Set<String> UNACCEPTABLE_ATTACHMENT_TYPES = ImmutableSet.of(
-            "application/zip", "application/x-gzip", "application/x-bzip2",
-            "application/x-compress", "application/x-compressed", "application/x-tar");
 
     /**
      * Returns whether or not an attachment of the specified type is installable (e.g. an apk).
@@ -70,11 +67,6 @@
             return false;
         }
 
-        if (isBlocked(contentType)) {
-            LogUtils.d(LOG_TAG, "content type '%s' is blocked. '%s", contentType, contentUri);
-            return false;
-        }
-
         final Intent mimetypeIntent = new Intent(Intent.ACTION_VIEW);
         mimetypeIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION
                 | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
@@ -106,13 +98,6 @@
     }
 
     /**
-     * @return whether the specified type is blocked.
-     */
-    public static boolean isBlocked(String contentType) {
-        return UNACCEPTABLE_ATTACHMENT_TYPES.contains(contentType);
-    }
-
-    /**
      * Extract and return filename's extension, converted to lower case, and not including the "."
      *
      * @return extension, or null if not found (or null/empty filename)