Fixed several bugs in AddFeedActivity
This commit is contained in:
parent
088a1ad673
commit
eeeff62037
|
@ -56,7 +56,12 @@ public class AddFeedActivity extends SherlockActivity {
|
|||
progDialog = new ProgressDialog(this) {
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
requester.cancelDownload(getContext(), downloadId);
|
||||
if (isWaitingForImage) {
|
||||
requester.cancelDownload(getContext(), imageDownloadId);
|
||||
} else {
|
||||
requester.cancelDownload(getContext(), downloadId);
|
||||
}
|
||||
|
||||
unregisterReceiver(downloadCompleted);
|
||||
dismiss();
|
||||
}
|
||||
|
@ -89,6 +94,18 @@ public class AddFeedActivity extends SherlockActivity {
|
|||
Log.d(TAG, "Stopping Activity");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
try {
|
||||
unregisterReceiver(downloadCompleted);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void addNewFeed() {
|
||||
String url = etxtFeedurl.getText().toString();
|
||||
url = URLChecker.prepareURL(url);
|
||||
|
|
Loading…
Reference in New Issue