Merge "Allow for internal types in @hide API" into tm-dev am: cc3898c6d7 am: bdb2dafe03

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17567131

Change-Id: If7ea1350251248065564c4d49b70086395b4b013
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Nathalie Le Clair
2022-04-05 08:51:03 +00:00
committed by Automerger Merge Worker

View File

@@ -5898,14 +5898,8 @@ public class AudioManager {
*/
@UnsupportedAppUsage
@RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
public void setWiredDeviceConnectionState(int device, int state, String address,
String name) {
final IAudioService service = getService();
int role = isOutputDevice(device)
? AudioDeviceAttributes.ROLE_OUTPUT : AudioDeviceAttributes.ROLE_INPUT;
AudioDeviceAttributes attributes = new AudioDeviceAttributes(
role, AudioDeviceInfo.convertInternalDeviceToDeviceType(device), address,
name, new ArrayList<>()/*mAudioProfiles*/, new ArrayList<>()/*mAudioDescriptors*/);
public void setWiredDeviceConnectionState(int device, int state, String address, String name) {
AudioDeviceAttributes attributes = new AudioDeviceAttributes(device, address, name);
setWiredDeviceConnectionState(attributes, state);
}