Loading media/java/android/media/AudioManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,17 @@ public class AudioManager { */ public static final String EXTRA_VOLUME_STREAM_TYPE = "android.media.EXTRA_VOLUME_STREAM_TYPE"; /** * @hide * The stream type alias for the volume changed intent. * For instance the intent may indicate a change of the {@link #STREAM_NOTIFICATION} stream * type (as indicated by the {@link #EXTRA_VOLUME_STREAM_TYPE} extra), but this is also * reflected by a change of the volume of its alias, {@link #STREAM_RING} on some devices, * {@link #STREAM_MUSIC} on others (e.g. a television). */ public static final String EXTRA_VOLUME_STREAM_TYPE_ALIAS = "android.media.EXTRA_VOLUME_STREAM_TYPE_ALIAS"; /** * @hide The volume associated with the stream for the volume changed intent. */ Loading services/core/java/com/android/server/audio/AudioService.java +2 −0 Original line number Diff line number Diff line Loading @@ -3791,6 +3791,8 @@ public class AudioService extends IAudioService.Stub { // fire changed intents for all streams mVolumeChanged.putExtra(AudioManager.EXTRA_VOLUME_STREAM_VALUE, index); mVolumeChanged.putExtra(AudioManager.EXTRA_PREV_VOLUME_STREAM_VALUE, oldIndex); mVolumeChanged.putExtra(AudioManager.EXTRA_VOLUME_STREAM_TYPE_ALIAS, mStreamVolumeAlias[mStreamType]); sendBroadcastToAll(mVolumeChanged); } return changed; Loading Loading
media/java/android/media/AudioManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,17 @@ public class AudioManager { */ public static final String EXTRA_VOLUME_STREAM_TYPE = "android.media.EXTRA_VOLUME_STREAM_TYPE"; /** * @hide * The stream type alias for the volume changed intent. * For instance the intent may indicate a change of the {@link #STREAM_NOTIFICATION} stream * type (as indicated by the {@link #EXTRA_VOLUME_STREAM_TYPE} extra), but this is also * reflected by a change of the volume of its alias, {@link #STREAM_RING} on some devices, * {@link #STREAM_MUSIC} on others (e.g. a television). */ public static final String EXTRA_VOLUME_STREAM_TYPE_ALIAS = "android.media.EXTRA_VOLUME_STREAM_TYPE_ALIAS"; /** * @hide The volume associated with the stream for the volume changed intent. */ Loading
services/core/java/com/android/server/audio/AudioService.java +2 −0 Original line number Diff line number Diff line Loading @@ -3791,6 +3791,8 @@ public class AudioService extends IAudioService.Stub { // fire changed intents for all streams mVolumeChanged.putExtra(AudioManager.EXTRA_VOLUME_STREAM_VALUE, index); mVolumeChanged.putExtra(AudioManager.EXTRA_PREV_VOLUME_STREAM_VALUE, oldIndex); mVolumeChanged.putExtra(AudioManager.EXTRA_VOLUME_STREAM_TYPE_ALIAS, mStreamVolumeAlias[mStreamType]); sendBroadcastToAll(mVolumeChanged); } return changed; Loading