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

Commit 528e382f authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android (Google) Code Review
Browse files

Merge "Fix 5242200 only update RemoteControlDisplay when a client is present"

parents ac73e4bb 33879457
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -3193,7 +3193,7 @@ public class AudioService extends IAudioService.Stub {
    /**
     * Helper function:
     * Called synchronized on mRCStack
     * mRCStack.empty() is false
     * mRCStack.isEmpty() is false
     */
    private void updateRemoteControlDisplay_syncRcs(int infoChangedFlags) {
        RemoteControlStackEntry rcse = mRCStack.peek();
@@ -3247,6 +3247,7 @@ public class AudioService extends IAudioService.Stub {
            return;
        }
        // refresh conditions were verified: update the remote controls
        // ok to call, mRCStack is not empty
        updateRemoteControlDisplay_syncRcs(infoChangedFlags);
    }

@@ -3460,10 +3461,12 @@ public class AudioService extends IAudioService.Stub {
                }
            }

            if (!mRCStack.isEmpty()) {
                // we have a new display, of which all the clients are now aware: have it be updated
                updateRemoteControlDisplay_syncRcs(RC_INFO_ALL);
            }
        }
    }

    /**
     * Unregister an IRemoteControlDisplay.