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

Commit a58ca462 authored by cketti's avatar cketti Committed by GitHub
Browse files

Merge pull request #1488 from k9mail/GH-1483_remove_settings_import_via_intent

Disable settings import via VIEW Intent
parents 2622b087 e858ca9e
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);