package de.danoeh.antennapod.activity;

import android.net.Uri;
import android.os.Bundle;

import de.danoeh.antennapod.core.preferences.UserPreferences;

/** Lets the user start the OPML-import process. */
public class OpmlImportFromIntentActivity extends OpmlImportBaseActivity {

    private static final String TAG = "OpmlImportFromIntentAct";

    @Override
	protected void onCreate(Bundle savedInstanceState) {
		setTheme(UserPreferences.getTheme());
		super.onCreate(savedInstanceState);

		getSupportActionBar().setDisplayHomeAsUpEnabled(true);

        Uri uri = getIntent().getData();
        if(uri.toString().startsWith("/")) {
            uri = Uri.parse("file://" + uri.toString());
        }
        importUri(uri);
    }

    @Override
    protected boolean finishWhenCanceled() {
        return true;
    }

}

@@ -33,16 +33,47 @@
 ivity;%0A%0A
+import android.content.Intent;%0A
 import a
@@ -618,16 +618,46 @@
 Data();%0A
+        if(uri != null) %7B%0A    
         
@@ -705,16 +705,20 @@
         
+   
+ 
 uri = Ur
@@ -754,16 +754,112 @@
 ing());%0A
+            %7D%0A        %7D else %7B%0A            uri = getIntent().getStringExtra(Intent.EXTRA_TEXT);%0A
         

Handle OPML send intent