Merge branch 'develop' of github.com:AntennaPod/AntennaPod into develop

This commit is contained in:
Martin Fietz 2017-04-10 21:49:57 +02:00
commit ef4bd9fd56
2 changed files with 27 additions and 6 deletions

View File

@ -191,6 +191,21 @@
<data android:host="*"/> <data android:host="*"/>
</intent-filter> </intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:mimeType="text/xml"/>
<data android:mimeType="text/plain"/>
<data android:mimeType="text/x-opml"/>
<data android:mimeType="application/xml"/>
<data android:mimeType="application/octet-stream"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
</intent-filter>
</activity> </activity>
<activity <activity
android:name=".activity.OpmlFeedChooserActivity" android:name=".activity.OpmlFeedChooserActivity"
@ -243,6 +258,7 @@
<data android:host="*"/> <data android:host="*"/>
<data android:pathPattern=".*\\.xml"/> <data android:pathPattern=".*\\.xml"/>
<data android:pathPattern=".*\\.rss"/> <data android:pathPattern=".*\\.rss"/>
<data android:pathPattern=".*\\.atom"/>
</intent-filter> </intent-filter>
<!-- Feedburner URLs --> <!-- Feedburner URLs -->

View File

@ -1,25 +1,30 @@
package de.danoeh.antennapod.activity; package de.danoeh.antennapod.activity;
import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import de.danoeh.antennapod.core.preferences.UserPreferences; 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 { public class OpmlImportFromIntentActivity extends OpmlImportBaseActivity {
private static final String TAG = "OpmlImportFromIntentAct"; private static final String TAG = "OpmlImportFromIntentAct";
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
setTheme(UserPreferences.getTheme()); setTheme(UserPreferences.getTheme());
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
Uri uri = getIntent().getData(); Uri uri = getIntent().getData();
if(uri.toString().startsWith("/")) { if (uri != null && uri.toString().startsWith("/")) {
uri = Uri.parse("file://" + uri.toString()); uri = Uri.parse("file://" + uri.toString());
} else {
uri = Uri.parse(getIntent().getStringExtra(Intent.EXTRA_TEXT));
} }
importUri(uri); importUri(uri);
} }