1 parent 792eb70 commit 790bf54Copy full SHA for 790bf54
1 file changed
app/src/main/java/github/paroj/dsub2000/util/Util.java
@@ -1365,7 +1365,9 @@ public void onAudioFocusChange(int focusChange) {
1365
} else if(focusChange == AudioManager.AUDIOFOCUS_LOSS && !downloadService.isRemoteEnabled()) {
1366
Log.i(TAG, "Permanently lost focus");
1367
focusListener = null;
1368
- downloadService.pause();
+ // Use temp pause to keep the notification visible so the
1369
+ // foreground service is not stopped and the user can resume.
1370
+ downloadService.pause(true);
1371
1372
if(audioFocusRequest != null && Build.VERSION.SDK_INT >= 26) {
1373
audioManager.abandonAudioFocusRequest(audioFocusRequest);
0 commit comments