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

Commit dba05b7c authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [5656146, 5653357, 5656373, 5656227, 5656421, 5654207,...

Merge cherrypicks of [5656146, 5653357, 5656373, 5656227, 5656421, 5654207, 5654208, 5654209, 5654210, 5656164, 5656412, 5656413, 5656355, 5656356, 5656357, 5655631, 5655632, 5656165, 5656166, 5656167, 5656168, 5656376, 5656422, 5656147, 5656148, 5656149] into pi-qpr2-release

Change-Id: Ic84732a2b3324a89c4f7a3f452ddb0a7e0cfe192
parents 241ff9a0 2dd98038
Loading
Loading
Loading
Loading
+40 −0
Original line number Diff line number Diff line
@@ -826,6 +826,34 @@ const ToneGenerator::ToneDescriptor ToneGenerator::sToneDescriptors[] = {
                        { .duration = 0 , .waveFreq = { 0 }, 0, 0}},
          .repeatCnt = ToneGenerator::TONEGEN_INF,
          .repeatSegment = 0 },                              // TONE_IE_CALL_WAITING
        { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 375, 400, 425, 0 }, 0, 0 },
                        { .duration = 0 , .waveFreq = { 0 }, 0, 0}},
          .repeatCnt = ToneGenerator::TONEGEN_INF,
          .repeatSegment = 0 },                              // TONE_INDIA_DIAL
        { .segments = { { .duration = 750, .waveFreq = { 400, 0 }, 0, 0 },
                      { .duration = 750, .waveFreq = { 0 }, 0, 0 },
                      { .duration = 0 , .waveFreq = { 0 }, 0, 0}},
          .repeatCnt = ToneGenerator::TONEGEN_INF,
          .repeatSegment = 0 },                               // TONE_INDIA_BUSY
        { .segments = { { .duration = 250, .waveFreq = { 400, 0 }, 0, 0 },
                        { .duration = 250, .waveFreq = { 0 }, 0, 0 },
                        { .duration = 0 , .waveFreq = { 0 }, 0, 0}},
          .repeatCnt = ToneGenerator::TONEGEN_INF,
          .repeatSegment = 0 },                              // TONE_INDIA_CONGESTION
        { .segments = { { .duration = 200, .waveFreq = { 400, 0 }, 0, 0 },
                        { .duration = 100, .waveFreq = { 0 }, 0, 0 },
                        { .duration = 200, .waveFreq = { 400, 0 }, 0, 0 },
                        { .duration = 7500, .waveFreq = { 0 }, 0, 0 },
                        { .duration = 0 , .waveFreq = { 0 }, 0, 0}},
          .repeatCnt = ToneGenerator::TONEGEN_INF,
          .repeatSegment = 0 },                              // TONE_INDIA_CALL_WAITING
        { .segments = { { .duration = 400, .waveFreq = { 375, 400, 425, 0 }, 0, 0 },
                      { .duration = 200, .waveFreq = { 0 }, 0, 0 },
                      { .duration = 400, .waveFreq = { 375, 400, 425, 0 }, 0, 0 },
                      { .duration = 2000, .waveFreq = { 0 }, 0, 0 },
                      { .duration = 0 , .waveFreq = { 0 }, 0, 0}},
          .repeatCnt = ToneGenerator::TONEGEN_INF,
          .repeatSegment = 0 },                               // TONE_INDIA_RINGTONE
};

// Used by ToneGenerator::getToneForRegion() to convert user specified supervisory tone type
@@ -900,6 +928,16 @@ const unsigned char /*tone_type*/ ToneGenerator::sToneMappingTable[NUM_REGIONS-1
            TONE_SUP_ERROR,              // TONE_SUP_ERROR
            TONE_IE_CALL_WAITING,        // TONE_SUP_CALL_WAITING
            TONE_IE_RINGTONE             // TONE_SUP_RINGTONE
        },
        {   // INDIA
            TONE_INDIA_DIAL,             // TONE_SUP_DIAL
            TONE_INDIA_BUSY,             // TONE_SUP_BUSY
            TONE_INDIA_CONGESTION,       // TONE_SUP_CONGESTION
            TONE_SUP_RADIO_ACK,          // TONE_SUP_RADIO_ACK
            TONE_SUP_RADIO_NOTAVAIL,     // TONE_SUP_RADIO_NOTAVAIL
            TONE_SUP_ERROR,              // TONE_SUP_ERROR
            TONE_INDIA_CALL_WAITING,     // TONE_SUP_CALL_WAITING
            TONE_INDIA_RINGTONE          // TONE_SUP_RINGTONE
        }
};

@@ -971,6 +1009,8 @@ ToneGenerator::ToneGenerator(audio_stream_type_t streamType, float volume, bool
        mRegion = HONGKONG;
    } else if (strstr(value, "ie") != NULL) {
        mRegion = IRELAND;
    } else if (strstr(value, "in") != NULL) {
        mRegion = INDIA;
    } else {
        mRegion = CEPT;
    }
+7 −0
Original line number Diff line number Diff line
@@ -212,6 +212,12 @@ private:
        // IRELAND Supervisory tones
        TONE_IE_RINGTONE,           // Ring Tone: A 400Hz + 450Hz tone repeated in a 0.4s on, 0.2s off, 0.4s on, 2.0s off pattern.
        TONE_IE_CALL_WAITING,       // Call waiting tone: 425Hz tone repeated in a 0.18s on, 0.2s off, 0.2s on, 4.5s off pattern.
        // INDIA supervisory tones
        TONE_INDIA_DIAL,            // Dial tone: 400 Hz tone modulated with 25Hz, continuous
        TONE_INDIA_BUSY,            // Busy tone: 400 Hz, 750ms ON, 750ms OFF...
        TONE_INDIA_CONGESTION,      // Congestion tone: 400 Hz, 250ms ON, 250ms OFF...
        TONE_INDIA_CALL_WAITING,    // Call waiting tone: 400 Hz, tone repeated in a 0.2s on, 0.1s off, 0.2s on, 7.5s off pattern.
        TONE_INDIA_RINGTONE,        // Ring tone: 400 Hz tone modulated with 25Hz, 0.4 on 0.2 off 0.4 on 2..0 off
        NUM_ALTERNATE_TONES
    };

@@ -223,6 +229,7 @@ private:
        SINGAPORE,
        HONGKONG,
        IRELAND,
        INDIA,
        CEPT,
        NUM_REGIONS
    };