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

Commit 42f0a36e authored by RoboErik's avatar RoboErik Committed by Android (Google) Code Review
Browse files

Merge changes Id38bcf7c,I54f156d9 into lmp-dev

* changes:
  Update MediaController comment to mention notification listeners
  Don't play a sound when adjusting volume while telephony is active
parents d400ca2f f2133474
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -47,8 +47,9 @@ import java.util.List;
 * receive updates from the session, such as metadata and play state changes.
 * <p>
 * A MediaController can be created through {@link MediaSessionManager} if you
 * hold the "android.permission.MEDIA_CONTENT_CONTROL" permission or directly if
 * you have a {@link MediaSession.Token} from the session owner.
 * hold the "android.permission.MEDIA_CONTENT_CONTROL" permission or are an
 * enabled notification listener or by getting a {@link MediaSession.Token}
 * directly from the session owner.
 * <p>
 * MediaController objects are thread-safe.
 */
+1 −1
Original line number Diff line number Diff line
@@ -231,7 +231,7 @@ public class MediaSessionRecord implements IBinder.DeathRecipient {
     * @param direction The direction to adjust volume in.
     */
    public void adjustVolume(int direction, int flags, String packageName, int uid) {
        if (isPlaybackActive(false)) {
        if (isPlaybackActive(false) || hasFlag(MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY)) {
            flags &= ~AudioManager.FLAG_PLAY_SOUND;
        }
        if (direction > 1) {