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 7cf83bcd9..4c94e2b76 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromIntentActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromIntentActivity.java @@ -6,25 +6,25 @@ 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"; @Override - protected void onCreate(Bundle savedInstanceState) { - setTheme(UserPreferences.getTheme()); - super.onCreate(savedInstanceState); + protected void onCreate(Bundle savedInstanceState) { + setTheme(UserPreferences.getTheme()); + super.onCreate(savedInstanceState); - getSupportActionBar().setDisplayHomeAsUpEnabled(true); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); Uri uri = getIntent().getData(); - if(uri != null) { - if(uri.toString().startsWith("/")) { - uri = Uri.parse("file://" + uri.toString()); - } + 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); }