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

Commit 4d69df3e authored by Hyundo Moon's avatar Hyundo Moon Committed by Android (Google) Code Review
Browse files

Merge "Set MediaSession.mCallback as non-null when a callback is set"

parents b016fa8b 4312f778
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ public final class MediaSession {

    private final MediaSessionEngine mImpl;

    // Do not change the name of mCallbackWrapper. Support lib accesses this by using reflection.
    // Do not change the name of mCallback. Support lib accesses this by using reflection.
    @UnsupportedAppUsage
    private Object mCallback;

@@ -160,6 +160,7 @@ public final class MediaSession {
     * @param callback The callback object
     */
    public void setCallback(@Nullable Callback callback) {
        mCallback = callback == null ? null : new Object();
        mImpl.setCallback(callback);
    }

@@ -173,6 +174,7 @@ public final class MediaSession {
     * @param handler The handler that events should be posted on.
     */
    public void setCallback(@Nullable Callback callback, @Nullable Handler handler) {
        mCallback = callback == null ? null : new Object();
        mImpl.setCallback(callback, handler);
    }