Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6233c18c authored by Lucas Dupin's avatar Lucas Dupin Committed by Automerger Merge Worker
Browse files

Merge "Fix issue where player would not be dismissed" into rvc-dev am:...

Merge "Fix issue where player would not be dismissed" into rvc-dev am: f51a9a0c am: dbdcda8e am: fc3476cf am: 15d83a6f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12038728

Change-Id: Icdabbf045cb8466a954d811445fe73b916e93388
parents ee26d1ef 15d83a6f
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -100,12 +100,7 @@ public class NotificationMediaManager implements Dumpable {
        PAUSED_MEDIA_STATES.add(PlaybackState.STATE_STOPPED);
        PAUSED_MEDIA_STATES.add(PlaybackState.STATE_PAUSED);
        PAUSED_MEDIA_STATES.add(PlaybackState.STATE_ERROR);
    }
    private static final HashSet<Integer> INACTIVE_MEDIA_STATES = new HashSet<>();
    static {
        INACTIVE_MEDIA_STATES.add(PlaybackState.STATE_NONE);
        INACTIVE_MEDIA_STATES.add(PlaybackState.STATE_STOPPED);
        INACTIVE_MEDIA_STATES.add(PlaybackState.STATE_ERROR);
        PAUSED_MEDIA_STATES.add(PlaybackState.STATE_CONNECTING);
    }

    private final NotificationEntryManager mEntryManager;
@@ -262,15 +257,6 @@ public class NotificationMediaManager implements Dumpable {
        return !PAUSED_MEDIA_STATES.contains(state);
    }

    /**
     * Check if a state should be considered active (playing or paused)
     * @param state a PlaybackState
     * @return true if active
     */
    public static boolean isActiveState(int state) {
        return !INACTIVE_MEDIA_STATES.contains(state);
    }

    public void setUpWithPresenter(NotificationPresenter presenter) {
        mPresenter = presenter;
    }