Convert string to uri
This commit is contained in:
parent
d555668d10
commit
77e89b5786
@ -6,7 +6,9 @@ import android.os.Bundle;
|
||||
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
|
||||
/** Lets the user start the OPML-import process. */
|
||||
/**
|
||||
* Lets the user start the OPML-import process.
|
||||
*/
|
||||
public class OpmlImportFromIntentActivity extends OpmlImportBaseActivity {
|
||||
|
||||
private static final String TAG = "OpmlImportFromIntentAct";
|
||||
@ -19,12 +21,10 @@ public class OpmlImportFromIntentActivity extends OpmlImportBaseActivity {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
Uri uri = getIntent().getData();
|
||||
if(uri != null) {
|
||||
if(uri.toString().startsWith("/")) {
|
||||
if (uri != null && uri.toString().startsWith("/")) {
|
||||
uri = Uri.parse("file://" + uri.toString());
|
||||
}
|
||||
} else {
|
||||
uri = getIntent().getStringExtra(Intent.EXTRA_TEXT);
|
||||
uri = Uri.parse(getIntent().getStringExtra(Intent.EXTRA_TEXT));
|
||||
}
|
||||
importUri(uri);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user