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

Commit 89f5c76e authored by Beth Thibodeau's avatar Beth Thibodeau
Browse files

Don't remove controls prematurely

The test for whether controls can resume can happen while the session is
active, so we don't want to remove them yet if that's the case

Bug: 151103474
Test: manual - play app that can't resume (e.g. GPM) verify controls show,
then pause and swipe from recents, verify controls are removed

Change-Id: I1630feddf7d367299fc7488ddeb376d5fc96748f
parent a16b8b31
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -566,8 +566,10 @@ public class MediaControlPanel {
                    public void onError() {
                        Log.d(TAG, "Cannot resume with " + componentName);
                        mServiceComponent = null;
                        clearControls();
                        // remove
                        if (!hasMediaSession()) {
                            // If it's not active and we can't resume, remove
                            removePlayer();
                        }
                    }
                },
                componentName);