diff options
author | daneren2005 <daneren2005@gmail.com> | 2013-12-03 13:23:29 -0800 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2013-12-03 13:23:29 -0800 |
commit | abce4d32b688db4aeb2657da71403eaeeaf0186b (patch) | |
tree | 260e756be7e6456eded1de8cd028c449835b3fcc | |
parent | 12688c374af537ceef8289c5ce450463223fe14d (diff) | |
download | dsub-abce4d32b688db4aeb2657da71403eaeeaf0186b.tar.gz dsub-abce4d32b688db4aeb2657da71403eaeeaf0186b.tar.bz2 dsub-abce4d32b688db4aeb2657da71403eaeeaf0186b.zip |
#203 Only pass onto now playing if service is active
-rw-r--r-- | src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java index 66d4d4ee..ae8c02a6 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java @@ -83,13 +83,16 @@ public class SubsonicFragmentActivity extends SubsonicActivity { stopService(new Intent(this, DownloadServiceImpl.class));
finish();
} else if(getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_DOWNLOAD)) {
- 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)) {
- intent.putExtra(Constants.INTENT_EXTRA_NAME_DOWNLOAD_VIEW, true);
+ DownloadService service = getDownloadService();
+ if(service != null && service.getCurrentPlaying() != null) {
+ 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)) {
+ intent.putExtra(Constants.INTENT_EXTRA_NAME_DOWNLOAD_VIEW, true);
+ }
+ startActivity(intent);
}
- startActivity(intent);
}
setContentView(R.layout.abstract_fragment_activity);
|