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

Commit 6dd1ab35 authored by Brad Ebinger's avatar Brad Ebinger Committed by Android (Google) Code Review
Browse files

Merge "Clone extras Bundle when operating on it in onExtrasChanged" into nyc-dev

parents bc94e86d 51c6581b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -751,12 +751,14 @@ public abstract class Connection {

    /**
     * Notifies listeners that connection extras has changed.
     * @param extras New connection extras.
     * @param extras New connection extras. This Bundle will be cloned to ensure that any concurrent
     * modifications to the extras Bundle do not affect Bundle operations in the onExtrasChanged
     * listeners.
     */
    public void setConnectionExtras(Bundle extras) {
        mExtras = extras;
        for (Listener l : mListeners) {
            l.onExtrasChanged(extras);
            l.onExtrasChanged(new Bundle(extras));
        }
    }