Merge pull request #3631 from ByteHamster/fix-sleep-timer
Stop listening to shake events and reset volume if sleep timer is reset
This commit is contained in:
commit
275d608711
|
@ -244,7 +244,7 @@ public class PlaybackServiceTaskManager {
|
|||
public synchronized void disableSleepTimer() {
|
||||
if (isSleepTimerActive()) {
|
||||
Log.d(TAG, "Disabling sleep timer");
|
||||
sleepTimerFuture.cancel(true);
|
||||
sleepTimer.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -449,6 +449,13 @@ public class PlaybackServiceTaskManager {
|
|||
}
|
||||
}
|
||||
|
||||
public void cancel() {
|
||||
sleepTimerFuture.cancel(true);
|
||||
if (shakeListener != null) {
|
||||
shakeListener.pause();
|
||||
}
|
||||
postCallback(callback::onSleepTimerReset);
|
||||
}
|
||||
}
|
||||
|
||||
public interface PSTMCallback {
|
||||
|
|
Loading…
Reference in New Issue