Skip to content

Commit 9c7d5d7

Browse files
committed
Fixed #165
1 parent 4e5c574 commit 9c7d5d7

2 files changed

Lines changed: 0 additions & 7 deletions

File tree

core/src/main/java/xyz/gianlu/librespot/connectstate/RestrictionsManager.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
*/
1010
public final class RestrictionsManager {
1111
public static final String REASON_ENDLESS_CONTEXT = "endless_context";
12-
public static final String REASON_NOT_PAUSED = "not_paused";
13-
public static final String REASON_ALREADY_PAUSED = "already_paused";
1412
public static final String REASON_NO_PREV_TRACK = "no_prev_track";
1513
public static final String REASON_NO_NEXT_TRACK = "no_next_track";
1614
private final Player.Restrictions.Builder restrictions;

core/src/main/java/xyz/gianlu/librespot/player/StateWrapper.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,6 @@ private void setContext(@NotNull Context ctx) {
230230
private void updateRestrictions() {
231231
if (context == null) return;
232232

233-
if (isPaused()) context.restrictions.disallow(Action.PAUSE, RestrictionsManager.REASON_ALREADY_PAUSED);
234-
else context.restrictions.allow(Action.PAUSE);
235-
if (isPlaying()) context.restrictions.disallow(Action.RESUME, RestrictionsManager.REASON_NOT_PAUSED);
236-
else context.restrictions.allow(Action.RESUME);
237-
238233
if (tracksKeeper.isPlayingFirst() && !isRepeatingContext())
239234
context.restrictions.disallow(Action.SKIP_PREV, RestrictionsManager.REASON_NO_PREV_TRACK);
240235
else

0 commit comments

Comments
 (0)