diff -r 85902f042028 -r a5e7a4f63858 uifw/EikStd/srvuisrc/eikkeysoundserver.cpp --- a/uifw/EikStd/srvuisrc/eikkeysoundserver.cpp Wed Sep 15 12:29:17 2010 +0300 +++ b/uifw/EikStd/srvuisrc/eikkeysoundserver.cpp Wed Oct 13 14:50:15 2010 +0300 @@ -88,7 +88,6 @@ TInt CEikKeySoundServer::LaunchServer(TThreadId& aThreadId) { - LOGTEXT(_L("CEikKeySoundServer::LaunchServer")); // First, check that ther server isn't already running. TFindServer findServer(__KEYSOUND_SERVER_NAME); TFullName name; @@ -193,7 +192,6 @@ void CEikKeySoundServer::ConstructL() { - LOGTEXT(_L("CEikKeySoundServer::ConstructL")); iInit = EFalse; iSidList = new(ELeave)CArrayFixFlat(KAknSoundInfoMapGranularity); iSoundList = new(ELeave)CArrayPtrFlat(KAknSoundInfoMapGranularity); @@ -244,7 +242,6 @@ CEikKeySoundServer::~CEikKeySoundServer() { - LOGTEXT(_L("CEikKeySoundServer::~CEikKeySoundServer")); if (iProfilesNotifyHandler) { iProfilesNotifyHandler->StopListening(); @@ -267,7 +264,6 @@ CSession2* CEikKeySoundServer::NewSessionL(const TVersion& aVersion, const RMessage2& /*aMessage*/) const { - LOGTEXT(_L("CEikKeySoundServer::NewSessionL")); TVersion ver(KKeySoundServMajorVN, KKeySoundServMinorVN, KKeySoundServBuildVN); if (!User::QueryVersionSupported(ver, aVersion)) { @@ -294,7 +290,6 @@ void CEikKeySoundServer::PlaySid(TInt aSid, TBool aPlaySelf) { - LOGTEXT1(_L("CEikKeySoundServer::PlaySid aSid: %d"), aSid); if (aSid == EAvkonSIDWarningTone && iWarningToneEnabled == 0) { // Don't play warning tone, when the warning tone is disabled in setting. @@ -389,8 +384,6 @@ void CEikKeySoundServer::SetDisabledScanCode( TInt aScanCode ) { - LOGTEXT1(_L("CEikKeySoundServer::SetDisabledScanCode aScanCode: %d"), - aScanCode); iDisabledScanCode = aScanCode; } @@ -434,8 +427,6 @@ CEikKeySoundSession::~CEikKeySoundSession() { - LOGTEXT1(_L("CEikKeySoundSession::~CEikKeySoundSession iClientUid %d"), - iClientUid); RemoveSids(iClientUid); if (iHasLockedContext) { @@ -446,7 +437,6 @@ } if (iOwnsDefaultSounds) { - LOGTEXT(_L("CEikKeySoundSession::~CEikKeySoundSession OwnsDefaultSounds")); RemoveSids(0); iServer->iInit = EFalse; } @@ -480,8 +470,6 @@ void CEikKeySoundSession::ServiceL(const RMessage2& aMessage) { - LOGTEXT1(_L("CEikKeySoundSession::ServiceL aMessage: %d"), - aMessage.Function()); if (aMessage.Function() == EKeySoundServerPlayKey) { TInt scancode = aMessage.Int0() & 0xff; @@ -595,7 +583,7 @@ { TInt uid = aMessage.Int0(); TInt size = aMessage.Int1(); - LOGTEXT1(_L("CEikKeySoundSession::AddSoundIdBufferL uid: %d"), uid); + // CBufFlat requires that size must be positive and not larger than KMaxTInt / 2. // Without this check the KeySoundServer could panic. if (size <= 0 || size >= ((KMaxTInt / 2) - KKeySoundServerBufExpandSize)) @@ -712,7 +700,6 @@ void CEikKeySoundSession::RemoveSids(TInt aUid) { - LOGTEXT1(_L("CEikKeySoundSession::RemoveSids aUid %d"), aUid); TUint uid = aUid << 16; if (!iServer->iSidList) { @@ -743,18 +730,7 @@ if (!duplicateFound) { // Remove sound at this position - if(id.iSoundInfo->IsWaittingPlay()) - { - LOGTEXT1(_L("CEikKeySoundSession::RemoveSids DestroyAfterplay : %d"), - (TInt)id.iSoundInfo ); - id.iSoundInfo->SetDestroyAfterPlay(ETrue); - } - else - { - LOGTEXT1(_L("CEikKeySoundSession::RemoveSids Destroy : %d"), - (TInt)id.iSoundInfo ); - delete id.iSoundInfo; - } + delete id.iSoundInfo; if (iServer->iSoundList) { iServer->iSoundList->Delete(ii); @@ -824,7 +800,6 @@ void CEikKeySoundSession::AddToneSidL(const TAknSoundID& aSoundID, CAknToneSoundInfo* aSoundInfo) { - LOGTEXT(_L("CEikKeySoundSession::AddToneSidL")); aSoundInfo->InitL(); TKeyArrayFix sidKey(_FOFF(TAknSoundID, iSid), ECmpTUint); @@ -843,7 +818,6 @@ void CEikKeySoundSession::AddSequenceSidL(const TAknSoundID& aSoundID, CAknSequenceSoundInfo* aSoundInfo) { - LOGTEXT(_L("CEikKeySoundSession::AddSequenceSidL")); aSoundInfo->InitL(); TKeyArrayFix sidKey(_FOFF(TAknSoundID, iSid), ECmpTUint); @@ -863,7 +837,6 @@ void CEikKeySoundSession::AddFileSidL(const TAknSoundID& aSoundID, CAknFileSoundInfo* aSoundInfo, const TDesC& aFileName) { - LOGTEXT(_L("CEikKeySoundSession::AddFileSidL")); aSoundInfo->InitL(aFileName, NULL); TKeyArrayFix sidKey(_FOFF(TAknSoundID, iSid), ECmpTUint); @@ -887,8 +860,6 @@ { iPriority = aPriority; iPreference = aPreference; - iWaittingPlay = EFalse; - iDestroyAfterPlay = EFalse; iVolume = ESoundVolume9; // default to loudest } @@ -908,17 +879,6 @@ return iVolume; } -TBool CEikSoundInfo::IsWaittingPlay() - { - LOGTEXT1(_L("CEikSoundInfo::IsWaittingPlay : %d"), iWaittingPlay); - return iWaittingPlay; - } - -void CEikSoundInfo::SetDestroyAfterPlay(TBool aDestroyAfterPlay) - { - iDestroyAfterPlay = aDestroyAfterPlay; - } - // ================================== // CAknSynthSoundInfo implementation. // ================================== @@ -1170,7 +1130,7 @@ delete iAudioPlayer; } -void CAknFileSoundInfo::InitL(const TDesC& aFileName, CMdaServer* /*aMdaServer*/) +void CAknFileSoundInfo::InitL(const TDesC& aFileName, CMdaServer* aMdaServer) { LOGTEXT(_L("CAknFileSoundInfo::InitL() - Filename:")); LOGTEXT(aFileName); @@ -1188,7 +1148,6 @@ // Create audio player. DoPlay() will be called in all circumstances. iAudioPlayer = CMdaAudioPlayerUtility::NewFilePlayerL(iFileName, *this, iPriority,(TMdaPriorityPreference)iPreference ); - iWaittingPlay =ETrue; LOGTEXT(_L(" CAknFileSoundInfo::PlayL() - Exit")); } @@ -1218,7 +1177,6 @@ delete iAudioPlayer; iAudioPlayer = NULL; - iWaittingPlay = EFalse; } } @@ -1245,7 +1203,6 @@ delete iAudioPlayer; iAudioPlayer = NULL; iPrepared = EFalse; - iWaittingPlay = EFalse; } } @@ -1312,19 +1269,12 @@ void CAknFileSoundInfo::MapcPlayComplete(TInt /*aError*/) { LOGTEXT(_L("CAknFileSoundInfo::MapcPlayComplete()")); - LOGTEXT1(_L(" aError:%d"), aError); + iPlaying = EFalse; - iWaittingPlay = EFalse; delete iAudioPlayer; iAudioPlayer = NULL; iPrepared = EFalse; - if(iDestroyAfterPlay) - { - LOGTEXT1(_L("CAknFileSoundInfo::MapcPlayComplete DestroyAfterPlay : %d"), - TInt(this)); - delete this; - } } // End of file