coreapplicationuis/SysAp/Src/SysApAppUi.cpp
branchRCL_3
changeset 33 332e7bf3b42f
parent 30 fc3225a0ab43
child 39 469fa8a78de7
equal deleted inserted replaced
30:fc3225a0ab43 33:332e7bf3b42f
   129 #include <ecom/ecom.h>
   129 #include <ecom/ecom.h>
   130 #include "sysapkeymanagement.h"
   130 #include "sysapkeymanagement.h"
   131 
   131 
   132 #include "SysApMediatorObserver.h"
   132 #include "SysApMediatorObserver.h"
   133 
   133 
   134 #include <SecondaryDisplay/SecondaryDisplaySysApAPI.h>
   134 #include <secondarydisplay/SecondaryDisplaySysApAPI.h>
   135 #include "aknSDData.h"
   135 #include "aknSDData.h"
   136 
   136 
   137 #include <AknTaskList.h>
   137 #include <AknTaskList.h>
   138 #include <layoutmetadata.cdl.h>
   138 #include <layoutmetadata.cdl.h>
   139 
   139 
   266  
   266  
   267     /*SysAp is set as system application (Symbian terminology). This means some special privilege compared
   267     /*SysAp is set as system application (Symbian terminology). This means some special privilege compared
   268       to other applications. For example it does not get closed when system is asked to close applications
   268       to other applications. For example it does not get closed when system is asked to close applications
   269     */
   269     */
   270     iEikonEnv->SetSystem( ETrue );
   270     iEikonEnv->SetSystem( ETrue );
       
   271 	// For cdma 
       
   272 
       
   273 	iTDEnable = FeatureManager::FeatureSupported( KFeatureIdFfTdScdma ); 
   271 
   274 
   272     iEikonEnv->WsSession().ComputeMode( RWsSession::EPriorityControlDisabled );
   275     iEikonEnv->WsSession().ComputeMode( RWsSession::EPriorityControlDisabled );
   273 
   276 
   274     static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->PushContextL( R_AVKON_SILENT_SKEY_LIST );
   277     static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->PushContextL( R_AVKON_SILENT_SKEY_LIST );
   275 
   278 
  3640                     }
  3643                     }
  3641                 }
  3644                 }
  3642 
  3645 
  3643             // Append memory cards for eject selection
  3646             // Append memory cards for eject selection
  3644             TInt count( iInsertedMemoryCards.Count() );
  3647             TInt count( iInsertedMemoryCards.Count() );
       
  3648             TInt corruptedMedia = 0;
  3645             for ( TInt i( 0 ); i < count; ++i )
  3649             for ( TInt i( 0 ); i < count; ++i )
  3646                 {
  3650                 {
       
  3651                 TVolumeInfo info;
       
  3652                 TInt err = iEikonEnv->FsSession().Volume(info, iInsertedMemoryCards[ i ].iDrive);
       
  3653                 TRACES( RDebug::Print(_L("CSysApAppUi::AddMmcMenuItemsL: corrupted media, iDrive (%d) Error: %d" ),iInsertedMemoryCards[ i ].iDrive, err ) );
       
  3654                 if(err != KErrNone)
       
  3655                     {
       
  3656                     corruptedMedia++;
       
  3657                     continue;
       
  3658                     }
  3647                 itemStringBuf = iSysApDriveList->GetFormattedDriveNameLC(
  3659                 itemStringBuf = iSysApDriveList->GetFormattedDriveNameLC(
  3648                         iInsertedMemoryCards[ i ].iDrive,
  3660                         iInsertedMemoryCards[ i ].iDrive,
  3649                         R_QTN_PWRC_EJECT_MEMORY_STORAGE );
  3661                         R_QTN_PWRC_EJECT_MEMORY_STORAGE );
  3650                 aProfileNameCDesCArray->AppendL( *itemStringBuf );
  3662                 aProfileNameCDesCArray->AppendL( *itemStringBuf );
  3651                 CleanupStack::PopAndDestroy( itemStringBuf );
  3663                 CleanupStack::PopAndDestroy( itemStringBuf );
  3654                     {
  3666                     {
  3655                     aItemIdArray.AppendL(
  3667                     aItemIdArray.AppendL(
  3656                             SecondaryDisplay::EPwrMenuItemEjectItemBase + i );
  3668                             SecondaryDisplay::EPwrMenuItemEjectItemBase + i );
  3657                     }
  3669                     }
  3658                 }
  3670                 }
  3659             if ( count > 0 )
  3671             if ( (count-corruptedMedia) > 0 )
  3660                 {
  3672                 {
  3661                 TRACES( RDebug::Print(_L("CSysApAppUi::AddMmcMenuItemsL: added \"Eject\"" ) ) );
  3673                 TRACES( RDebug::Print(_L("CSysApAppUi::AddMmcMenuItemsL: added \"Eject\"" ) ) );
  3662                 iPowerkeyMenuEjectShown = ETrue;
  3674                 iPowerkeyMenuEjectShown = ETrue;
  3663                 iPowerkeyMenuEjectSelectionBase = aPowerMenuItemIndex;
  3675                 iPowerkeyMenuEjectSelectionBase = aPowerMenuItemIndex;
  3664                 aPowerMenuItemIndex += count;
  3676                 aPowerMenuItemIndex += (count-corruptedMedia);
  3665                 }
  3677                 }
  3666             }
  3678             }
  3667         }
  3679         }
  3668 #endif // RD_MULTIPLE_DRIVE
  3680 #endif // RD_MULTIPLE_DRIVE
  3669     }
  3681     }