diff options
| author | 2022-01-27 21:31:35 -0800 | |
|---|---|---|
| committer | 2022-01-29 00:23:58 +0000 | |
| commit | f2675c7315fd743f67b72e04448d87f54abf92f7 (patch) | |
| tree | 8bfc0df0d637bfb0f37e3d1caa7b148fedfb5fca | |
| parent | 3578c8f2ee1a4fd5aff8404b81e390400aeb3656 (diff) | |
API changes requires for Bluetooth apk inside the apex to build.
Bug: 216731966
Test: atest BluetoothInstrumentationTests
Change-Id: Idc16950373e0d90f77f1abc743127a25c09db03d
| -rw-r--r-- | core/api/system-current.txt | 4 | ||||
| -rw-r--r-- | media/java/android/media/AudioManager.java | 24 |
2 files changed, 25 insertions, 3 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 171ee9a0a95b..4146f732b3e1 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -5868,6 +5868,7 @@ package android.media { method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void unregisterAudioPolicyAsync(@NonNull android.media.audiopolicy.AudioPolicy); method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void unregisterMuteAwaitConnectionCallback(@NonNull android.media.AudioManager.MuteAwaitConnectionCallback); method public void unregisterVolumeGroupCallback(@NonNull android.media.AudioManager.VolumeGroupCallback); + field public static final String ACTION_VOLUME_CHANGED = "android.media.VOLUME_CHANGED_ACTION"; field public static final int AUDIOFOCUS_FLAG_DELAY_OK = 1; // 0x1 field public static final int AUDIOFOCUS_FLAG_LOCK = 4; // 0x4 field public static final int AUDIOFOCUS_FLAG_PAUSES_ON_DUCKABLE_LOSS = 2; // 0x2 @@ -5876,7 +5877,10 @@ package android.media { field public static final int DEVICE_VOLUME_BEHAVIOR_FIXED = 2; // 0x2 field public static final int DEVICE_VOLUME_BEHAVIOR_FULL = 1; // 0x1 field public static final int DEVICE_VOLUME_BEHAVIOR_VARIABLE = 0; // 0x0 + field public static final String EXTRA_VOLUME_STREAM_TYPE = "android.media.EXTRA_VOLUME_STREAM_TYPE"; + field public static final String EXTRA_VOLUME_STREAM_VALUE = "android.media.EXTRA_VOLUME_STREAM_VALUE"; field @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public static final int STREAM_ASSISTANT = 11; // 0xb + field public static final int STREAM_BLUETOOTH_SCO = 6; // 0x6 field public static final int SUCCESS = 0; // 0x0 } diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index a2704f9a67fd..1b4c0bc64f78 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -181,6 +181,22 @@ public class AudioManager { public static final String VOLUME_CHANGED_ACTION = "android.media.VOLUME_CHANGED_ACTION"; /** + * @hide Broadcast intent when the volume for a particular stream type changes. + * Includes the stream, the new volume and previous volumes. + * Notes: + * - for internal platform use only, do not make public, + * - never used for "remote" volume changes + * + * @see #EXTRA_VOLUME_STREAM_TYPE + * @see #EXTRA_VOLUME_STREAM_VALUE + * @see #EXTRA_PREV_VOLUME_STREAM_VALUE + */ + @SystemApi + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + @SuppressLint("ActionValue") + public static final String ACTION_VOLUME_CHANGED = "android.media.VOLUME_CHANGED_ACTION"; + + /** * @hide Broadcast intent when the devices for a particular stream type changes. * Includes the stream, the new devices and previous devices. * Notes: @@ -244,7 +260,8 @@ public class AudioManager { /** * @hide The stream type for the volume changed intent. */ - @UnsupportedAppUsage + @SystemApi + @SuppressLint("ActionValue") public static final String EXTRA_VOLUME_STREAM_TYPE = "android.media.EXTRA_VOLUME_STREAM_TYPE"; /** @@ -261,7 +278,8 @@ public class AudioManager { /** * @hide The volume associated with the stream for the volume changed intent. */ - @UnsupportedAppUsage + @SystemApi + @SuppressLint("ActionValue") public static final String EXTRA_VOLUME_STREAM_VALUE = "android.media.EXTRA_VOLUME_STREAM_VALUE"; @@ -368,7 +386,7 @@ public class AudioManager { public static final int STREAM_NOTIFICATION = AudioSystem.STREAM_NOTIFICATION; /** @hide Used to identify the volume of audio streams for phone calls when connected * to bluetooth */ - @UnsupportedAppUsage + @SystemApi public static final int STREAM_BLUETOOTH_SCO = AudioSystem.STREAM_BLUETOOTH_SCO; /** @hide Used to identify the volume of audio streams for enforced system sounds * in certain countries (e.g camera in Japan) */ |