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

Commit a97494e3 authored by Hall Liu's avatar Hall Liu
Browse files

Rename UK tones to GB tones

Previous CL which introduced UK tones was incorrect since "uk" is not a
valid ISO country code. This change checks for the "gb" country code
instead.

Change-Id: I1f99a7ec5dd24a112b2b1b486fe613f965fba7ff
Fix: 31003209
parent 10da5ab2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -193,8 +193,8 @@ private:
        TONE_JAPAN_DIAL,            // Dial tone: 400Hz, continuous
        TONE_JAPAN_BUSY,            // Busy tone: 400Hz, 500ms ON, 500ms OFF...
        TONE_JAPAN_RADIO_ACK,       // Radio path acknowlegment: 400Hz, 1s ON, 2s OFF...
        // UK Supervisory tones
        TONE_UK_RINGTONE,           // Ring Tone: A 400Hz + 450Hz tone repeated in a 0.4s on, 0.2s off, 0.4s on, 2.0s off pattern.
        // GB Supervisory tones
        TONE_GB_RINGTONE,           // Ring Tone: A 400Hz + 450Hz tone repeated in a 0.4s on, 0.2s off, 0.4s on, 2.0s off pattern.
        // AUSTRALIA Supervisory tones
        TONE_AUSTRALIA_RINGTONE,    // Ring tone: A 400Hz + 450Hz tone repeated in a 0.4s on, 0.2s off, 0.4s on, 2.0s off pattern.
        TONE_AUSTRALIA_BUSY,        // Busy tone: 425 Hz repeated in a 0.375s on, 0.375s off pattern.
@@ -206,7 +206,7 @@ private:
    enum region {
        ANSI,
        JAPAN,
        UK,
        GB,
        AUSTRALIA,
        CEPT,
        NUM_REGIONS
+5 −5
Original line number Diff line number Diff line
@@ -746,7 +746,7 @@ const ToneGenerator::ToneDescriptor ToneGenerator::sToneDescriptors[] = {
                        { .duration = 2000, .waveFreq = { 0 }, 0, 0},
                        { .duration = 0, .waveFreq = { 0 }, 0, 0}},
          .repeatCnt = ToneGenerator::TONEGEN_INF,
          .repeatSegment = 0 },                              // TONE_UK_RINGTONE
          .repeatSegment = 0 },                              // TONE_GB_RINGTONE
        { .segments = { { .duration = 400, .waveFreq = { 400, 450, 0 }, 0, 0 },
                        { .duration = 200, .waveFreq = { 0 }, 0, 0 },
                        { .duration = 400, .waveFreq = { 400, 450, 0 }, 0, 0 },
@@ -796,7 +796,7 @@ const unsigned char /*tone_type*/ ToneGenerator::sToneMappingTable[NUM_REGIONS-1
            TONE_SUP_CALL_WAITING,       // TONE_SUP_CALL_WAITING
            TONE_SUP_RINGTONE            // TONE_SUP_RINGTONE
        },
        {   // UK
        {   // GB
            TONE_SUP_DIAL,               // TONE_SUP_DIAL
            TONE_SUP_BUSY,               // TONE_SUP_BUSY
            TONE_SUP_CONGESTION,         // TONE_SUP_CONGESTION
@@ -804,7 +804,7 @@ const unsigned char /*tone_type*/ ToneGenerator::sToneMappingTable[NUM_REGIONS-1
            TONE_SUP_RADIO_NOTAVAIL,     // TONE_SUP_RADIO_NOTAVAIL
            TONE_SUP_ERROR,              // TONE_SUP_ERROR
            TONE_SUP_CALL_WAITING,       // TONE_SUP_CALL_WAITING
            TONE_UK_RINGTONE             // TONE_SUP_RINGTONE
            TONE_GB_RINGTONE             // TONE_SUP_RINGTONE
        },
        {   // AUSTRALIA
            TONE_ANSI_DIAL,             // TONE_SUP_DIAL
@@ -869,8 +869,8 @@ ToneGenerator::ToneGenerator(audio_stream_type_t streamType, float volume, bool
        mRegion = ANSI;
    } else if (strstr(value, "jp") != NULL) {
        mRegion = JAPAN;
    } else if (strstr(value, "uk") != NULL) {
        mRegion = UK;
    } else if (strstr(value, "gb") != NULL) {
        mRegion = GB;
    } else if (strstr(value, "au") != NULL) {
        mRegion = AUSTRALIA;
    } else {