// This section re-defines new output device constants from AudioSystem, because the AudioSystem
// class is not used by other parts of the framework, which instead use definitions and methods
// from AudioManager. AudioSystem is an internal class used by AudioManager and AudioService.
/** @hide
* The audio device code for representing "no device." */
public static final int DEVICE_NONE = AudioSystem.DEVICE_NONE;
/** @hide
* The audio output device code for the small speaker at the front of the device used
* when placing calls. Does not refer to an in-ear headphone without attached microphone,
* such as earbuds, earphones, or in-ear monitors (IEM). Those would be handled as a
* {@link #DEVICE_OUT_WIRED_HEADPHONE}.
*/
public static final int DEVICE_OUT_EARPIECE = AudioSystem.DEVICE_OUT_EARPIECE;
/** @hide
* The audio output device code for the built-in speaker */
public static final int DEVICE_OUT_SPEAKER = AudioSystem.DEVICE_OUT_SPEAKER;
/** @hide
* The audio output device code for a wired headset with attached microphone */
public static final int DEVICE_OUT_WIRED_HEADSET = AudioSystem.DEVICE_OUT_WIRED_HEADSET;
/** @hide
* The audio output device code for a wired headphone without attached microphone */
public static final int DEVICE_OUT_WIRED_HEADPHONE = AudioSystem.DEVICE_OUT_WIRED_HEADPHONE;
/** @hide
* The audio output device code for generic Bluetooth SCO, for voice */
public static final int DEVICE_OUT_BLUETOOTH_SCO = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO;
/** @hide
* The audio output device code for Bluetooth SCO Headset Profile (HSP) and
* Hands-Free Profile (HFP), for voice
*/
public static final int DEVICE_OUT_BLUETOOTH_SCO_HEADSET =
AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET;
/** @hide
* The audio output device code for Bluetooth SCO car audio, for voice */
public static final int DEVICE_OUT_BLUETOOTH_SCO_CARKIT =
AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
之前对二者的关系不是特别的清楚. 现在搞清楚.
通过这段注释 我们可以很清晰的知道
// This section re-defines new output device constants from AudioSystem, because the AudioSystem
// class is not used by other parts of the framework, which instead use definitions and methods
// from AudioManager. AudioSystem is an internal class used by AudioManager and AudioService.
AudioSystem 是 AudioManager and AudioService. 的 internal class 内部类, 不对别的模块提供支持.