Merge "AudioManager: update javadoc for setCommunicationDevice" into sc-dev

This commit is contained in:
Eric Laurent
2021-03-11 17:02:17 +00:00
committed by Android (Google) Code Review

View File

@@ -7084,7 +7084,6 @@ public class AudioManager {
* <pre class="prettyprint"> * <pre class="prettyprint">
* // Get an AudioManager instance * // Get an AudioManager instance
* AudioManager audioManager = Context.getSystemService(AudioManager.class); * AudioManager audioManager = Context.getSystemService(AudioManager.class);
* try {
* AudioDeviceInfo speakerDevice = null; * AudioDeviceInfo speakerDevice = null;
* List<AudioDeviceInfo> devices = audioManager.getAvailableCommunicationDevices(); * List<AudioDeviceInfo> devices = audioManager.getAvailableCommunicationDevices();
* for (AudioDeviceInfo device : devices) { * for (AudioDeviceInfo device : devices) {
@@ -7102,9 +7101,6 @@ public class AudioManager {
* // Turn speakerphone OFF. * // Turn speakerphone OFF.
* audioManager.clearCommunicationDevice(); * audioManager.clearCommunicationDevice();
* } * }
* } catch (IllegalArgumentException e) {
* // Handle exception.
* }
* </pre> * </pre>
* @param device the requested audio device. * @param device the requested audio device.
* @return <code>true</code> if the request was accepted, <code>false</code> otherwise. * @return <code>true</code> if the request was accepted, <code>false</code> otherwise.