am a241a83d: am 720c772a: am d5ceabd3: Merge changes Id38bcf7c,I54f156d9 into lmp-dev
* commit 'a241a83d18530d3bb9010a36f8cc89e50ad20c7b': Update MediaController comment to mention notification listeners Don't play a sound when adjusting volume while telephony is active
This commit is contained in:
@@ -48,8 +48,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.
|
||||
*/
|
||||
|
||||
@@ -235,7 +235,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) {
|
||||
|
||||
Reference in New Issue
Block a user