Merge change 1155 into donut
* changes: Don't allow negative numbers in ToneGenerator toneType parameter Bug 1836596
This commit is contained in:
@@ -357,7 +357,7 @@ ToneGenerator::~ToneGenerator() {
|
||||
bool ToneGenerator::startTone(int toneType) {
|
||||
bool lResult = false;
|
||||
|
||||
if (toneType >= NUM_TONES)
|
||||
if ((toneType < 0) || (toneType >= NUM_TONES))
|
||||
return lResult;
|
||||
|
||||
if (mState == TONE_IDLE) {
|
||||
|
||||
Reference in New Issue
Block a user