Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e858ca9e authored by cketti's avatar cketti
Browse files

Remove intent filter for settings file MIME type

Importing by URI isn't properly supported. We want to fix this eventually, but
for now we just remove the functionality.

Fixes #1483
parent 06e4ca19
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -83,13 +83,6 @@
                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>
                <data android:mimeType="application/x-k9settings"/>

                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
            </intent-filter>
        </activity>

        <activity
+0 −18
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ import com.fsck.k9.helper.SizeFormatter;
import com.fsck.k9.mail.AuthType;
import com.fsck.k9.mail.ServerSettings;
import com.fsck.k9.mail.Transport;
import com.fsck.k9.mail.internet.MimeUtility;
import com.fsck.k9.mail.store.RemoteStore;
import com.fsck.k9.mailstore.StorageManager;
import com.fsck.k9.preferences.SettingsExporter;
@@ -371,23 +370,6 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
        return search;
    }


    @Override
    public void onNewIntent(Intent intent) {
        Uri uri = intent.getData();
        Log.i(K9.LOG_TAG, "Accounts Activity got uri " + uri);
        if (uri != null) {
            ContentResolver contentResolver = getContentResolver();

            Log.i(K9.LOG_TAG, "Accounts Activity got content of type " + contentResolver.getType(uri));

            String contentType = contentResolver.getType(uri);
            if (MimeUtility.K9_SETTINGS_MIME_TYPE.equals(contentType)) {
                onImport(uri);
            }
        }
    }

    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);