Merge change 1155 into donut

* changes:
  Don't allow negative numbers in ToneGenerator toneType parameter Bug 1836596
This commit is contained in:
Android (Google) Code Review
2009-05-07 11:52:06 -07:00

View File

@@ -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) {