Fixed NullpointerException in AddFeedActivity

This commit is contained in:
daniel oeh 2013-05-11 00:19:43 +02:00
parent 9a15545efe
commit 20d2557723

View File

@ -2,6 +2,8 @@ package de.danoeh.antennapod.activity;
import java.util.Date;
import org.apache.commons.lang3.StringUtils;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
@ -45,7 +47,8 @@ public class AddFeedActivity extends SherlockActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
if (AppConfig.DEBUG)
Log.d(TAG, "Was started with Intent "+getIntent().getAction()+" and Data "+getIntent().getDataString());
Log.d(TAG, "Was started with Intent " + getIntent().getAction()
+ " and Data " + getIntent().getDataString());
setTheme(UserPreferences.getTheme());
super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
@ -56,7 +59,7 @@ public class AddFeedActivity extends SherlockActivity {
progDialog = new ProgressDialog(this);
etxtFeedurl = (EditText) findViewById(R.id.etxtFeedurl);
if (getIntent().getAction().equals(Intent.ACTION_VIEW)) {
if (StringUtils.equals(getIntent().getAction(), Intent.ACTION_VIEW)) {
etxtFeedurl.setText(getIntent().getDataString());
}