diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-03-29 19:41:54 +0200 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-03-29 19:41:54 +0200 |
commit | 7f666c8cd50d5d527d662ec9120493472f87d56c (patch) | |
tree | ece42de7d4e395b5fa64e040cc828cebde0a56dc /app/src/main/java | |
parent | 208749d4a4709e0225ef8a2d24fc23120af00a2a (diff) | |
download | AntennaPod-7f666c8cd50d5d527d662ec9120493472f87d56c.zip |
OPML Import: Fix URI containing absolute path
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromIntentActivity.java | 3 | ||||
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromIntentActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromIntentActivity.java index ab4b0d0ee..02e16a7b5 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromIntentActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromIntentActivity.java @@ -18,6 +18,9 @@ public class OpmlImportFromIntentActivity extends OpmlImportBaseActivity { getSupportActionBar().setDisplayHomeAsUpEnabled(true); Uri uri = getIntent().getData(); + if(uri.toString().startsWith("/")) { + uri = Uri.parse("file://" + uri.toString()); + } importUri(uri); } diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java index b781e5141..b2dab7f68 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java @@ -135,6 +135,9 @@ public class OpmlImportFromPathActivity extends OpmlImportBaseActivity { super.onActivityResult(requestCode, resultCode, data); if (resultCode == RESULT_OK && requestCode == CHOOSE_OPML_FILE) { Uri uri = data.getData(); + if(uri.toString().startsWith("/")) { + uri = Uri.parse("file://" + uri.toString()); + } importUri(uri); } } |