am b85c374: Merge change 1155 into donut

Merge commit 'b85c37432b3836fd30c81191425d7e00dcf2082c'

* commit 'b85c37432b3836fd30c81191425d7e00dcf2082c':
  Don't allow negative numbers in ToneGenerator toneType parameter
This commit is contained in:
Android (Google) Code Review
2009-05-07 11:54:50 -07:00
committed by The Android Open Source Project

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