Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1155efdc authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android Git Automerger
Browse files

am 2ba92c71: do not merge bug 3370834 Cherrypick from master

* commit '2ba92c71':
  do not merge bug 3370834 Cherrypick from master
parents 2ec4af59 2ba92c71
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -156,6 +156,7 @@ public:
        MODE_NORMAL = 0,
        MODE_RINGTONE,
        MODE_IN_CALL,
        MODE_IN_COMMUNICATION,
        NUM_MODES  // not a valid entry, denotes end-of-list
    };

@@ -466,7 +467,7 @@ public:
    AudioParameter(const String8& keyValuePairs);
    virtual ~AudioParameter();

    // reserved parameter keys for changeing standard parameters with setParameters() function.
    // reserved parameter keys for changing standard parameters with setParameters() function.
    // Using these keys is mandatory for AudioFlinger to properly monitor audio output/input
    // configuration changes and act accordingly.
    //  keyRouting: to change audio routing, value is an int in AudioSystem::audio_devices
@@ -474,11 +475,14 @@ public:
    //  keyFormat: to change audio format, value is an int in AudioSystem::audio_format
    //  keyChannels: to change audio channel configuration, value is an int in AudioSystem::audio_channels
    //  keyFrameCount: to change audio output frame count, value is an int
    //  keyInputSource: to change audio input source, value is an int in audio_source
    //     (defined in media/mediarecorder.h)
    static const char *keyRouting;
    static const char *keySamplingRate;
    static const char *keyFormat;
    static const char *keyChannels;
    static const char *keyFrameCount;
    static const char *keyInputSource;

    String8 toString();

+3 −3
Original line number Diff line number Diff line
@@ -602,9 +602,9 @@ enum audio_device_e {

// Audio mode
enum audio_mode_e {
    AUDIO_MODE_NORMAL,      // phone idle
    AUDIO_MODE_RINGTONE,    // phone ringing
    AUDIO_MODE_IN_CALL      // phone call connected
    AUDIO_MODE_NORMAL,      // device idle
    AUDIO_MODE_RINGTONE,    // device ringing
    AUDIO_MODE_IN_CALL      // audio call connected (VoIP or telephony)
};

// Values for "accessMode" field of buffer_config_t:
+2 −1
Original line number Diff line number Diff line
@@ -44,7 +44,8 @@ enum audio_source {
    AUDIO_SOURCE_VOICE_CALL = 4,
    AUDIO_SOURCE_CAMCORDER = 5,
    AUDIO_SOURCE_VOICE_RECOGNITION = 6,
    AUDIO_SOURCE_MAX = AUDIO_SOURCE_VOICE_RECOGNITION,
    AUDIO_SOURCE_VOICE_COMMUNICATION = 7,
    AUDIO_SOURCE_MAX = AUDIO_SOURCE_VOICE_COMMUNICATION,

    AUDIO_SOURCE_LIST_END  // must be last - used to validate audio source type
};
+6 −1
Original line number Diff line number Diff line
@@ -966,9 +966,14 @@ public class AudioManager {
     */
    public static final int MODE_RINGTONE           = AudioSystem.MODE_RINGTONE;
    /**
     * In call audio mode. A call is established.
     * In call audio mode. A telephony call is established.
     */
    public static final int MODE_IN_CALL            = AudioSystem.MODE_IN_CALL;
    /**
     * @hide
     * In communication audio mode. An audio/video chat or VoIP call is established.
     */
    public static final int MODE_IN_COMMUNICATION   = AudioSystem.MODE_IN_COMMUNICATION;

    /* Routing bits for setRouting/getRouting API */
    /**
+2 −1
Original line number Diff line number Diff line
@@ -252,7 +252,8 @@ public class AudioRecord
        //--------------
        // audio source
        if ( (audioSource < MediaRecorder.AudioSource.DEFAULT) ||
             (audioSource > MediaRecorder.getAudioSourceMax()) )  {
                (audioSource > MediaRecorder.AudioSource.VOICE_COMMUNICATION) )  {
                //(audioSource > MediaRecorder.getAudioSourceMax()) )  {
            throw (new IllegalArgumentException("Invalid audio source."));
        } else {
            mRecordSource = audioSource;
Loading