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:
committed by
The Android Open Source Project
commit
30f91d6e10
@@ -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