Loading media/java/android/media/AudioManager.java +19 −0 Original line number Original line Diff line number Diff line Loading @@ -567,6 +567,25 @@ public class AudioManager { @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final int FLAG_FROM_KEY = 1 << 12; public static final int FLAG_FROM_KEY = 1 << 12; /** @hide */ @IntDef(flag = false, prefix = "FLAG", value = { FLAG_SHOW_UI, FLAG_ALLOW_RINGER_MODES, FLAG_PLAY_SOUND, FLAG_REMOVE_SOUND_AND_VIBRATE, FLAG_VIBRATE, FLAG_FIXED_VOLUME, FLAG_BLUETOOTH_ABS_VOLUME, FLAG_SHOW_SILENT_HINT, FLAG_HDMI_SYSTEM_AUDIO_VOLUME, FLAG_ACTIVE_MEDIA_ONLY, FLAG_SHOW_UI_WARNINGS, FLAG_SHOW_VIBRATE_HINT, FLAG_FROM_KEY, }) @Retention(RetentionPolicy.SOURCE) public @interface Flags {} // The iterator of TreeMap#entrySet() returns the entries in ascending key order. // The iterator of TreeMap#entrySet() returns the entries in ascending key order. private static final TreeMap<Integer, String> FLAG_NAMES = new TreeMap<>(); private static final TreeMap<Integer, String> FLAG_NAMES = new TreeMap<>(); Loading media/java/android/media/session/MediaSessionManager.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -1127,9 +1127,10 @@ public final class MediaSessionManager { * toast showing the volume should be shown. * toast showing the volume should be shown. * * * @param sessionToken the remote media session token * @param sessionToken the remote media session token * @param flags extra information about how to handle the volume change * @param flags flags containing extra action or information regarding the volume change */ */ void onVolumeChanged(@NonNull MediaSession.Token sessionToken, int flags); void onVolumeChanged(@NonNull MediaSession.Token sessionToken, @AudioManager.Flags int flags); /** /** * Called when the default remote session is changed where the default remote session * Called when the default remote session is changed where the default remote session Loading Loading
media/java/android/media/AudioManager.java +19 −0 Original line number Original line Diff line number Diff line Loading @@ -567,6 +567,25 @@ public class AudioManager { @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final int FLAG_FROM_KEY = 1 << 12; public static final int FLAG_FROM_KEY = 1 << 12; /** @hide */ @IntDef(flag = false, prefix = "FLAG", value = { FLAG_SHOW_UI, FLAG_ALLOW_RINGER_MODES, FLAG_PLAY_SOUND, FLAG_REMOVE_SOUND_AND_VIBRATE, FLAG_VIBRATE, FLAG_FIXED_VOLUME, FLAG_BLUETOOTH_ABS_VOLUME, FLAG_SHOW_SILENT_HINT, FLAG_HDMI_SYSTEM_AUDIO_VOLUME, FLAG_ACTIVE_MEDIA_ONLY, FLAG_SHOW_UI_WARNINGS, FLAG_SHOW_VIBRATE_HINT, FLAG_FROM_KEY, }) @Retention(RetentionPolicy.SOURCE) public @interface Flags {} // The iterator of TreeMap#entrySet() returns the entries in ascending key order. // The iterator of TreeMap#entrySet() returns the entries in ascending key order. private static final TreeMap<Integer, String> FLAG_NAMES = new TreeMap<>(); private static final TreeMap<Integer, String> FLAG_NAMES = new TreeMap<>(); Loading
media/java/android/media/session/MediaSessionManager.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -1127,9 +1127,10 @@ public final class MediaSessionManager { * toast showing the volume should be shown. * toast showing the volume should be shown. * * * @param sessionToken the remote media session token * @param sessionToken the remote media session token * @param flags extra information about how to handle the volume change * @param flags flags containing extra action or information regarding the volume change */ */ void onVolumeChanged(@NonNull MediaSession.Token sessionToken, int flags); void onVolumeChanged(@NonNull MediaSession.Token sessionToken, @AudioManager.Flags int flags); /** /** * Called when the default remote session is changed where the default remote session * Called when the default remote session is changed where the default remote session Loading