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

Commit 3cba0c18 authored by Sanket Agarwal's avatar Sanket Agarwal
Browse files

Now Playing List gets stuck in a loop

We are incorrectly setting the status of the Now Playing List folder to
uncached which makes it fetch the folder in a loop if there is possible
pagination going on

Bug: b/32051433
Change-Id: Ibcd26731c7ed4ac24d816c2f4529970e3a2f29cd
(cherry picked from commit 4ae05bfe91b1f550446500b55b1fb40b3227e42f)
parent 5ebd0a31
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -925,6 +925,10 @@ class AvrcpControllerStateMachine extends StateMachine {
            return;
        }

        if (DBG) {
            Log.d(TAG, "To Browse folder " + bn + " is cached " + bn.isCached() +
                " current folder " + mBrowseTree.getCurrentBrowsedFolder());
        }
        if (bn.equals(mBrowseTree.getCurrentBrowsedFolder()) && bn.isCached()) {
            if (DBG) {
                Log.d(TAG, "Same cached folder -- returning existing children.");
+4 −1
Original line number Diff line number Diff line
@@ -281,7 +281,10 @@ public class BrowseTree {
        }

        // Set the previous folder as not cached so that we fetch the contents again.
        if (!bn.equals(mCurrentBrowseNode)) {
            Log.d(TAG, "Set cache false " + bn + " curr " + mCurrentBrowseNode);
            mCurrentBrowseNode.setCached(false);
        }

        mCurrentBrowseNode = bn;
        return true;