aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2018-09-01 13:51:00 -0700
committerScott Jackson <daneren2005@gmail.com>2018-09-01 13:51:00 -0700
commit0e97692e08be98d846043e283f52f2ed815dcaf6 (patch)
tree8e5469b215ad91a0ae213b7be8401741ecdb4111 /app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
parent7f55a43e3d59015d03277fa77cf626c68e3bbded (diff)
downloaddsub-0e97692e08be98d846043e283f52f2ed815dcaf6.tar.gz
dsub-0e97692e08be98d846043e283f52f2ed815dcaf6.tar.bz2
dsub-0e97692e08be98d846043e283f52f2ed815dcaf6.zip
Fixed #880: Use explicit startForegroundService for Android 8+
Diffstat (limited to 'app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
index a1c5ceef..5948064d 100644
--- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
+++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
@@ -144,7 +144,7 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte
applyTheme();
applyFullscreen();
super.onCreate(bundle);
- startService(new Intent(this, DownloadService.class));
+ DownloadService.startService(this);
setVolumeControlStream(AudioManager.STREAM_MUSIC);
if(getIntent().hasExtra(Constants.FRAGMENT_POSITION)) {
@@ -1003,7 +1003,7 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte
break;
}
Log.w(TAG, "DownloadService not running. Attempting to start it.");
- startService(new Intent(this, DownloadService.class));
+ DownloadService.startService(this);
Util.sleepQuietly(50L);
}