Support Singapore specific supervisory tone
Singapore use CEPT standard supervisory tones except
for busy and ringtone. The Singapore mapping will be
used if gsm.operator.iso-country == "sg".
Bug: 63120560
Test: Build and test ring back tone for Singapore
Change-Id: I86076b0799a741ad8c54968799e400622d223ccd
diff --git a/media/libaudioclient/ToneGenerator.cpp b/media/libaudioclient/ToneGenerator.cpp
index ea856af..435cfa2 100644
--- a/media/libaudioclient/ToneGenerator.cpp
+++ b/media/libaudioclient/ToneGenerator.cpp
@@ -787,6 +787,18 @@
{ .duration = 0 , .waveFreq = { 0 }, 0, 0}},
.repeatCnt = ToneGenerator::TONEGEN_INF,
.repeatSegment = 0 }, // TONE_AUSTRALIA_CONGESTION
+ { .segments = { { .duration = 750, .waveFreq = { 425, 0 }, 0, 0 },
+ { .duration = 750, .waveFreq = { 0 }, 0, 0 },
+ { .duration = 0 , .waveFreq = { 0 }, 0, 0}},
+ .repeatCnt = ToneGenerator::TONEGEN_INF,
+ .repeatSegment = 0 }, // TONE_SG_BUSY
+ { .segments = { { .duration = 400, .waveFreq = { 401, 425, 449, 0 }, 0, 0 },
+ { .duration = 200, .waveFreq = { 0 }, 0, 0 },
+ { .duration = 400, .waveFreq = { 401, 425, 449, 0 }, 0, 0 },
+ { .duration = 2000, .waveFreq = { 0 }, 0, 0 },
+ { .duration = 0 , .waveFreq = { 0 }, 0, 0}},
+ .repeatCnt = ToneGenerator::TONEGEN_INF,
+ .repeatSegment = 0 }, // TONE_SG_RINGTONE
};
// Used by ToneGenerator::getToneForRegion() to convert user specified supervisory tone type
@@ -831,6 +843,16 @@
TONE_SUP_ERROR, // TONE_SUP_ERROR
TONE_AUSTRALIA_CALL_WAITING,// TONE_SUP_CALL_WAITING
TONE_AUSTRALIA_RINGTONE // TONE_SUP_RINGTONE
+ },
+ { // SINGAPORE
+ TONE_SUP_DIAL, // TONE_SUP_DIAL
+ TONE_SG_BUSY, // TONE_SUP_BUSY
+ TONE_SUP_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_SUP_CALL_WAITING, // TONE_SUP_CALL_WAITING
+ TONE_SG_RINGTONE // TONE_SUP_RINGTONE
}
};
@@ -889,6 +911,8 @@
mRegion = GB;
} else if (strstr(value, "au") != NULL) {
mRegion = AUSTRALIA;
+ } else if (strstr(value, "sg") != NULL) {
+ mRegion = SINGAPORE;
} else {
mRegion = CEPT;
}