coreapplicationuis/SysAp/Src/SysApAppUi.cpp
branchRCL_3
changeset 30 fc3225a0ab43
parent 24 a72ff4214918
child 33 332e7bf3b42f
equal deleted inserted replaced
24:a72ff4214918 30:fc3225a0ab43
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // INCLUDES
    19 // INCLUDES
    20 
    20 
       
    21 #include<akndiscreetpopup.h>
    21 #include <avkon.hrh>
    22 #include <avkon.hrh>
    22 #include <avkon.rsg>
    23 #include <avkon.rsg>
    23 #include <eikon.hrh>
    24 #include <eikon.hrh>
    24 #include <apgwgnam.h>
    25 #include <apgwgnam.h>
    25 #include <eiksrv.h>
    26 #include <eiksrv.h>
   205     iSysApConfirmationQueryForRestart( NULL ),
   206     iSysApConfirmationQueryForRestart( NULL ),
   206     iSignalNotify( NULL ),
   207     iSignalNotify( NULL ),
   207 #ifndef RD_MULTIPLE_DRIVE
   208 #ifndef RD_MULTIPLE_DRIVE
   208     iMemoryCardDialog( 0 ),
   209     iMemoryCardDialog( 0 ),
   209 #endif // RD_MULTIPLE_DRIVE
   210 #endif // RD_MULTIPLE_DRIVE
   210     iProfileNote( NULL ),
       
   211     iProfileNoteId( 0 ),
       
   212     iPowerKeyPopupMenuActive( EFalse ),
   211     iPowerKeyPopupMenuActive( EFalse ),
   213     iDisablePowerkeyMenu( EFalse ),
   212     iDisablePowerkeyMenu( EFalse ),
   214     iDeviceLockEnabled( EFalse ),
   213     iDeviceLockEnabled( EFalse ),
   215     iKeyLockEnabled( EFalse ),
   214     iKeyLockEnabled( EFalse ),
   216     iShowkeypadActivatedNoteAfterSoftReject( EFalse ),
   215     iShowkeypadActivatedNoteAfterSoftReject( EFalse ),
   552         delete iSysApShutdownAnimation;
   551         delete iSysApShutdownAnimation;
   553 #ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION
   552 #ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION
   554         }
   553         }
   555 #endif // RD_STARTUP_ANIMATION_CUSTOMIZATION
   554 #endif // RD_STARTUP_ANIMATION_CUSTOMIZATION
   556 
   555 
   557     delete iProfileNote;
   556   
   558 
   557 
   559 #ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION
   558 #ifndef RD_STARTUP_ANIMATION_CUSTOMIZATION
   560     if( iAnimTimer )
   559     if( iAnimTimer )
   561         {
   560         {
   562         iAnimTimer->Cancel();
   561         iAnimTimer->Cancel();
  1722     {
  1721     {
  1723     TRACES( RDebug::Print( _L("CSysApAppUi::ShowProfileNoteL") ) );
  1722     TRACES( RDebug::Print( _L("CSysApAppUi::ShowProfileNoteL") ) );
  1724 
  1723 
  1725     if ( UiReady() )
  1724     if ( UiReady() )
  1726         {
  1725         {
  1727         if ( iProfileNote )
  1726       
  1728             {
       
  1729             // when a call is coming in, there might be a pending "Selected profile"
       
  1730             // we don't want to show anymore
       
  1731             iProfileNote->CancelNoteL( iProfileNoteId );
       
  1732             }
       
  1733 
       
  1734         TBufC<KMaxProfileNameLength> profileName;
  1727         TBufC<KMaxProfileNameLength> profileName;
  1735         HBufC* noteStringBuf = NULL;
  1728         HBufC* noteStringBuf = NULL;
  1736         ActiveProfileNameL( profileName.Des() );
  1729         ActiveProfileNameL( profileName.Des() );
  1737         noteStringBuf = StringLoader::LoadLC( R_TEXT_MODE_SELECTED, profileName, iEikonEnv );
  1730         noteStringBuf = StringLoader::LoadLC( R_TEXT_MODE_SELECTED, profileName, iEikonEnv );
  1738         TPtr textBuffer = noteStringBuf->Des();
  1731         TPtr textBuffer = noteStringBuf->Des();
  1739         AknTextUtils::DisplayTextLanguageSpecificNumberConversion( textBuffer );
  1732         AknTextUtils::DisplayTextLanguageSpecificNumberConversion( textBuffer );
  1740 
  1733 
  1741         // profile note is constructed when it is needed for the first time
  1734        
  1742         if ( !iProfileNote )
       
  1743             {
       
  1744             iProfileNote = CAknGlobalNote::NewL();
       
  1745             iProfileNote->SetTone( EAvkonSIDConfirmationTone );
       
  1746             }
       
  1747 
       
  1748         // Set secondary display data if necessary
  1735         // Set secondary display data if necessary
  1749         if ( iSysApFeatureManager->CoverDisplaySupported() )
  1736         if ( iSysApFeatureManager->CoverDisplaySupported() )
  1750             {
  1737             {
  1751             TRACES( RDebug::Print( _L("CSysApAppUi::ShowProfileNoteL - Notifying secondary display") ) );
  1738             TRACES( RDebug::Print( _L("CSysApAppUi::ShowProfileNoteL - Notifying secondary display") ) );
  1752             SecondaryDisplay::TProfileName sdProfileName;
  1739             SecondaryDisplay::TProfileName sdProfileName;
  1753             sdProfileName.Append(profileName.Left(SecondaryDisplay::KProfileNameMaxLen));
  1740             sdProfileName.Append(profileName.Left(SecondaryDisplay::KProfileNameMaxLen));
  1754             SecondaryDisplay::TProfileNotePckg pckg(sdProfileName);
  1741             SecondaryDisplay::TProfileNotePckg pckg(sdProfileName);
  1755             CAknSDData* sd = CAknSDData::NewL(SecondaryDisplay::KCatSysAp, SecondaryDisplay::ECmdShowProfileNote, pckg);
  1742             CAknSDData* sd = CAknSDData::NewL(SecondaryDisplay::KCatSysAp, SecondaryDisplay::ECmdShowProfileNote, pckg);
  1756             iProfileNote->SetSecondaryDisplayData(sd); // ownership to notifier client
  1743            
  1757             }
  1744             }
  1758 
  1745 
  1759         iProfileNoteId = iProfileNote->ShowNoteL( EAknGlobalConfirmationNote, textBuffer );
  1746 
  1760 
  1747         CAknDiscreetPopup::ShowGlobalPopupL(textBuffer,KNullDesC, KAknsIIDNone, KNullDesC);
  1761         CleanupStack::PopAndDestroy( ); // noteStringbuf
  1748          
       
  1749         CleanupStack::PopAndDestroy(); // noteStringbuf 
  1762 
  1750 
  1763         iSysApLightsController->ProfileChangedL(); // All notes should always turn lights on.
  1751         iSysApLightsController->ProfileChangedL(); // All notes should always turn lights on.
  1764         }
  1752         }
  1765     }
  1753     }
  1766 
  1754 
  4057     if ( currentState != iDeviceLockEnabled ) // filter out unnecessary light status modifications
  4045     if ( currentState != iDeviceLockEnabled ) // filter out unnecessary light status modifications
  4058         {
  4046         {
  4059         iSysApLightsController->DeviceLockStateChangedL( iDeviceLockEnabled );
  4047         iSysApLightsController->DeviceLockStateChangedL( iDeviceLockEnabled );
  4060         }
  4048         }
  4061     
  4049     
  4062     if( iDeviceLockEnabled )
  4050  /*   if( iDeviceLockEnabled )
  4063         {
  4051         {
  4064         if( iKeyLockEnabled )
  4052         if( iKeyLockEnabled )
  4065             {
  4053             {
  4066             KeyLock().DisableWithoutNote();
  4054             KeyLock().DisableWithoutNote();
  4067             }
  4055             }
  4068         }
  4056         }*/
  4069     else
  4057     if(! iDeviceLockEnabled )
  4070         {
  4058         {
  4071         // let's not activate keylock in case device lock was disabled during call or in cradle
  4059         // let's not activate keylock in case device lock was disabled during call or in cradle
  4072         iKeyLockOnBeforeCall = EFalse;
  4060         iKeyLockOnBeforeCall = EFalse;
  4073         iKeyLockOnBeforeCradle = EFalse;
  4061         iKeyLockOnBeforeCradle = EFalse;
  4074 
  4062