uifw/AvKon/animdllsrc/AknAnimKeySound.cpp
changeset 33 b3425bf29f82
parent 21 558113899881
equal deleted inserted replaced
21:558113899881 33:b3425bf29f82
    30 #include "avkoninternalpskeys.h"    // KAknIdleAppWindowGroupId
    30 #include "avkoninternalpskeys.h"    // KAknIdleAppWindowGroupId
    31 #include <avkondomainpskeys.h>      // KAknPowerMenuStatus & KAknEndKeyEvent
    31 #include <avkondomainpskeys.h>      // KAknPowerMenuStatus & KAknEndKeyEvent
    32 
    32 
    33 // This is currently nasty set dependencies, API should be moved to middleware layer asap 
    33 // This is currently nasty set dependencies, API should be moved to middleware layer asap 
    34 #include <ctsydomainpskeys.h> 
    34 #include <ctsydomainpskeys.h> 
    35 #include <activeidle2domainpskeys.h>
    35 
    36 #include <networkhandlingdomainpskeys.h>
    36 #include <networkhandlingdomainpskeys.h>
    37 #include <PSVariables.h>
    37 #include <PSVariables.h>
    38 
    38 
    39 #include <hwrmlight.h> 
    39 #include <hwrmlight.h> 
    40 #include <tactilefeedbackserver.h>
    40 #include <tactilefeedbackserver.h>
   523         {
   523         {
   524         TInt ps(0), startupOk(0), idle(0);
   524         TInt ps(0), startupOk(0), idle(0);
   525 
   525 
   526         // If system is not in idle or there are calls ongoing, then end key ought to be generated.
   526         // If system is not in idle or there are calls ongoing, then end key ought to be generated.
   527         User::LeaveIfError( RProperty::Get( KPSUidCtsyCallInformation, KCTsyCallState, ps ) );
   527         User::LeaveIfError( RProperty::Get( KPSUidCtsyCallInformation, KCTsyCallState, ps ) );
   528         User::LeaveIfError( RProperty::Get( KPSUidAiInformation, KActiveIdleState, idle ) );
       
   529         User::LeaveIfError( RProperty::Get( KPSUidUikon, KUikGlobalNotesAllowed, startupOk ) );
   528         User::LeaveIfError( RProperty::Get( KPSUidUikon, KUikGlobalNotesAllowed, startupOk ) );
   530 
   529 
   531         RDebug::Print(_L("call: %d, idle %d, notes %d"), ps, idle, startupOk);
   530         RDebug::Print(_L("call: %d, idle %d, notes %d"), ps, idle, startupOk);
   532 
   531 
   533         // Call state not yet initialized or startup not yet complete but no emergency call ongoing.
   532         // Call state not yet initialized or startup not yet complete but no emergency call ongoing.
   534         if (ps == EPSCTsyCallStateUninitialized || 
   533         if (ps == EPSCTsyCallStateUninitialized || 
   535            (ps == EPSCTsyCallStateNone && !startupOk) )
   534            (ps == EPSCTsyCallStateNone && !startupOk) )
   536             {
   535             {
   537             return;
   536             return;
   538             }
   537             }
   539         
       
   540         if ( idle == EPSAiForeground )
       
   541             { 
       
   542             // Notify active idle plugins that combined end key / power key has been pressed.
       
   543             RProperty::Set(KPSUidAvkonDomain, KAknEndKeyEvent, 1); 
       
   544             }
       
   545         
       
   546         if ( ps != EPSCTsyCallStateNone )
   538         if ( ps != EPSCTsyCallStateNone )
   547             {
   539             {
   548             // A phone call is active.
   540             // A phone call is active.
   549             aResult = EEmulateNowPhoneCallActive;
   541             aResult = EEmulateNowPhoneCallActive;
   550             }
       
   551         else if ( idle != EPSAiForeground )
       
   552             {
       
   553             // We are not in idle view. No active phone calls.
       
   554             aResult = EEmulateNow;
       
   555             }
   542             }
   556         else
   543         else
   557             {
   544             {
   558             // We are in idle view with no active phone calls. 
   545             // We are in idle view with no active phone calls. 
   559             TInt powerMenuActive(0);
   546             TInt powerMenuActive(0);