diff options
author | Scott Jackson <daneren2005@gmail.com> | 2018-09-01 13:51:00 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2018-09-01 13:51:00 -0700 |
commit | 0e97692e08be98d846043e283f52f2ed815dcaf6 (patch) | |
tree | 8e5469b215ad91a0ae213b7be8401741ecdb4111 /app/src/main/java/github/daneren2005/dsub/activity | |
parent | 7f55a43e3d59015d03277fa77cf626c68e3bbded (diff) | |
download | dsub-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')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java | 4 |
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); } |