]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
android: Remove MIME type filter when importing trusted certificates
authorTobias Brunner <tobias@strongswan.org>
Fri, 29 Jun 2018 14:04:10 +0000 (16:04 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 3 Jul 2018 09:31:44 +0000 (11:31 +0200)
This way we should see files even if the MIME type has not been set
correctly while downloading it.

src/frontends/android/app/src/main/java/org/strongswan/android/ui/TrustedCertificateImportActivity.java

index f61db05b0fe7c77ba38ce7b7a2d8ffaf615463eb..9cfecf34850121e7a27af58ec1a13e3b69ff9532 100644 (file)
@@ -45,14 +45,6 @@ public class TrustedCertificateImportActivity extends AppCompatActivity
 {
        private static final int OPEN_DOCUMENT = 0;
        private static final String DIALOG_TAG = "Dialog";
-
-       /* same as those listed in the manifest */
-       private static final String[] ACCEPTED_MIME_TYPES = {
-               "application/x-x509-ca-cert",
-               "application/x-x509-server-cert",
-               "application/x-pem-file",
-               "application/pkix-cert"
-       };
        private Uri mCertificateUri;
 
        @TargetApi(Build.VERSION_CODES.KITKAT)
@@ -76,7 +68,6 @@ public class TrustedCertificateImportActivity extends AppCompatActivity
                {
                        Intent openIntent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
                        openIntent.setType("*/*");
-                       openIntent.putExtra(Intent.EXTRA_MIME_TYPES, ACCEPTED_MIME_TYPES);
                        try
                        {
                                startActivityForResult(openIntent, OPEN_DOCUMENT);