Revert "Add setting for continuing playback when app is closed"
This reverts commit 1a2ea90d7e.
This commit is contained in:
@@ -60,8 +60,6 @@ interface PlaybackSettings : Settings<PlaybackSettings.Listener> {
|
||||
val pauseOnRepeat: Boolean
|
||||
/** Whether to maintain the play/pause state when skipping or editing the queue */
|
||||
val rememberPause: Boolean
|
||||
/** Whether playback should continue when the app is dismissed from recents. */
|
||||
val continueWhenAppClosed: Boolean
|
||||
|
||||
interface Listener {
|
||||
/** Called when one of the ReplayGain configurations have changed. */
|
||||
@@ -136,11 +134,6 @@ class PlaybackSettingsImpl @Inject constructor(@ApplicationContext context: Cont
|
||||
override val rememberPause: Boolean
|
||||
get() = sharedPreferences.getBoolean(getString(R.string.set_key_remember_pause), false)
|
||||
|
||||
override val continueWhenAppClosed: Boolean
|
||||
get() =
|
||||
sharedPreferences.getBoolean(
|
||||
getString(R.string.set_key_continue_app_closed), true)
|
||||
|
||||
override fun migrate() {
|
||||
// MusicMode was converted to PlaySong in 3.2.0
|
||||
fun Int.migrateMusicMode() =
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.oxycblt.auxio.AuxioService.Companion.INTENT_KEY_START_ID
|
||||
import org.oxycblt.auxio.ForegroundListener
|
||||
import org.oxycblt.auxio.ForegroundServiceNotification
|
||||
import org.oxycblt.auxio.IntegerTable
|
||||
import org.oxycblt.auxio.playback.PlaybackSettings
|
||||
import org.oxycblt.auxio.playback.state.DeferredPlayback
|
||||
import org.oxycblt.auxio.playback.state.PlaybackStateManager
|
||||
import org.oxycblt.auxio.widgets.WidgetComponent
|
||||
@@ -38,7 +37,6 @@ private constructor(
|
||||
context: Context,
|
||||
private val foregroundListener: ForegroundListener,
|
||||
private val playbackManager: PlaybackStateManager,
|
||||
private val playbackSettings: PlaybackSettings,
|
||||
exoHolderFactory: ExoPlaybackStateHolder.Factory,
|
||||
sessionHolderFactory: MediaSessionHolder.Factory,
|
||||
widgetComponentFactory: WidgetComponent.Factory,
|
||||
@@ -48,7 +46,6 @@ private constructor(
|
||||
@Inject
|
||||
constructor(
|
||||
private val playbackManager: PlaybackStateManager,
|
||||
private val playbackSettings: PlaybackSettings,
|
||||
private val exoHolderFactory: ExoPlaybackStateHolder.Factory,
|
||||
private val sessionHolderFactory: MediaSessionHolder.Factory,
|
||||
private val widgetComponentFactory: WidgetComponent.Factory,
|
||||
@@ -59,7 +56,6 @@ private constructor(
|
||||
context,
|
||||
foregroundListener,
|
||||
playbackManager,
|
||||
playbackSettings,
|
||||
exoHolderFactory,
|
||||
sessionHolderFactory,
|
||||
widgetComponentFactory,
|
||||
@@ -84,7 +80,7 @@ private constructor(
|
||||
}
|
||||
|
||||
fun handleTaskRemoved() {
|
||||
if (!playbackSettings.continueWhenAppClosed || !playbackManager.progression.isPlaying) {
|
||||
if (!playbackManager.progression.isPlaying) {
|
||||
playbackManager.endSession()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
<string name="set_key_rewind_prev" translatable="false">KEY_PREV_REWIND</string>
|
||||
<string name="set_key_repeat_pause" translatable="false">KEY_LOOP_PAUSE</string>
|
||||
<string name="set_key_remember_pause" translatable="false">auxio_remember_pause</string>
|
||||
<string name="set_key_continue_app_closed" translatable="false">auxio_continue_app_closed</string>
|
||||
|
||||
<string name="set_key_home_tabs" translatable="false">auxio_home_tabs</string>
|
||||
<string name="set_key_hide_collaborators" translatable="false">auxio_hide_collaborators</string>
|
||||
|
||||
@@ -303,8 +303,6 @@
|
||||
<string name="set_repeat_pause_desc">Pause when a song repeats</string>
|
||||
<string name="set_remember_pause">Remember pause</string>
|
||||
<string name="set_remember_pause_desc">Remain playing/paused when skipping or editing queue</string>
|
||||
<string name="set_continue_app_closed">Continue when app closed</string>
|
||||
<string name="set_continue_app_closed_desc">Continue playback when app is swiped away from recents</string>
|
||||
<string name="set_replay_gain">Volume normalization</string>
|
||||
<string name="set_replay_gain_mode">ReplayGain strategy</string>
|
||||
<string name="set_replay_gain_mode_off">Off</string>
|
||||
|
||||
@@ -27,12 +27,6 @@
|
||||
app:summary="@string/set_remember_pause_desc"
|
||||
app:title="@string/set_remember_pause" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:key="@string/set_key_continue_app_closed"
|
||||
app:summary="@string/set_continue_app_closed_desc"
|
||||
app:title="@string/set_continue_app_closed" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/set_replay_gain">
|
||||
|
||||
Reference in New Issue
Block a user