diff options
author | daneren2005 <daneren2005@gmail.com> | 2013-12-03 15:16:58 -0800 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2013-12-03 15:16:58 -0800 |
commit | 59c4878e5372d7a3862e41a2550c0e2f55534999 (patch) | |
tree | 2cde2291a7ec0df612a7c8a266b705a796de1185 | |
parent | abce4d32b688db4aeb2657da71403eaeeaf0186b (diff) | |
download | dsub-59c4878e5372d7a3862e41a2550c0e2f55534999.tar.gz dsub-59c4878e5372d7a3862e41a2550c0e2f55534999.tar.bz2 dsub-59c4878e5372d7a3862e41a2550c0e2f55534999.zip |
Fix pressing download notification while not currentPlaying == null
-rw-r--r-- | src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java index ae8c02a6..d1390908 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java @@ -84,11 +84,12 @@ public class SubsonicFragmentActivity extends SubsonicActivity { finish();
} else if(getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_DOWNLOAD)) {
DownloadService service = getDownloadService();
- if(service != null && service.getCurrentPlaying() != null) {
+ boolean downloadView = getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_DOWNLOAD_VIEW);
+ if((service != null && service.getCurrentPlaying() != null) || downloadView) {
getIntent().removeExtra(Constants.INTENT_EXTRA_NAME_DOWNLOAD);
Intent intent = new Intent();
intent.setClass(this, DownloadActivity.class);
- if(getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_DOWNLOAD_VIEW)) {
+ if(downloadView) {
intent.putExtra(Constants.INTENT_EXTRA_NAME_DOWNLOAD_VIEW, true);
}
startActivity(intent);
|