coreapplicationuis/SysAp/Src/SysApAppUi.cpp
changeset 49 76883296a0d5
parent 48 2222076f5c60
child 56 11a052f4b02e
equal deleted inserted replaced
48:2222076f5c60 49:76883296a0d5
    30 #include <hwrmpowerstatesdkpskeys.h>
    30 #include <hwrmpowerstatesdkpskeys.h>
    31 #include <wlaninternalpskeys.h> 
    31 #include <wlaninternalpskeys.h> 
    32 #include <HbDeviceNotificationDialogSymbian.h>
    32 #include <HbDeviceNotificationDialogSymbian.h>
    33 //#include <HbDeviceInputDialogSymbian.h>
    33 //#include <HbDeviceInputDialogSymbian.h>
    34 #include <hbsymbianvariant.h>
    34 #include <hbsymbianvariant.h>
       
    35 //#include <hbtextresolversymbian.h>
    35 #include <UikonInternalPSKeys.h>
    36 #include <UikonInternalPSKeys.h>
    36 
    37 
    37 //#include "SysApWsClient.h"
    38 //#include "SysApWsClient.h"
    38 #include "SysApFeatureManager.h"
    39 #include "SysApFeatureManager.h"
    39 #include "SysApNspsHandler.h"
    40 #include "SysApNspsHandler.h"
    50 #include "sysapbatteryinfocontroller.h"
    51 #include "sysapbatteryinfocontroller.h"
    51 #include "SysApSimChanged.h"
    52 #include "SysApSimChanged.h"
    52 #include "MSysApBtSapController.h"
    53 #include "MSysApBtSapController.h"
    53 #include "MSysApBtController.h"
    54 #include "MSysApBtController.h"
    54 #include "MSysApUsbIndicator.h"
    55 #include "MSysApUsbIndicator.h"
       
    56 //#include <hbindicatorsymbian.h>
       
    57 //#include <psmclient.h>
       
    58 //#include <psmsettings.h>
    55 #include "sysapkeymanagement.h"
    59 #include "sysapkeymanagement.h"
    56 #include "SysApShutdownImage.h"
    60 #include "SysApShutdownImage.h"
       
    61 #include "SysApKeySndHandler.h"
    57 
    62 
    58 #include <settingsinternalcrkeys.h>
    63 #include <settingsinternalcrkeys.h>
    59 #include <keyguardaccessapi.h>
    64 #include <keyguardaccessapi.h>
    60 #include <eikdef.h>
    65 #include <eikdef.h>
    61 #include <eikenv.h>
    66 #include <eikenv.h>
    63 class CHbSymbianVariant;
    68 class CHbSymbianVariant;
    64 const TInt KModifierMask( 0 );
    69 const TInt KModifierMask( 0 );
    65 _LIT_SECURITY_POLICY_PASS(KAlwaysPassPolicy);
    70 _LIT_SECURITY_POLICY_PASS(KAlwaysPassPolicy);
    66 _LIT_SECURITY_POLICY_C1(KWriteDeviceDataPolicy, ECapabilityWriteDeviceData);
    71 _LIT_SECURITY_POLICY_C1(KWriteDeviceDataPolicy, ECapabilityWriteDeviceData);
    67 const TInt KDelayBeforeNextScanningRound( 1000000 );
    72 const TInt KDelayBeforeNextScanningRound( 1000000 );
       
    73 /*
       
    74 _LIT(KPsmPlugin,"com.nokia.hb.powersavemodeplugin/1.0");
       
    75 _LIT(KPsm,"PSM");
       
    76 _LIT(KCharging,"Charging");
       
    77 _LIT(KPsmlocalisationfile, "powermanagement_");
       
    78 _LIT(KtsfilePath, "z:/resource/qt/translations/");
       
    79 _LIT(KlowbatteryIcon,"qtg_small_bt_low_battery.svg");
       
    80 _LIT(KbatteryFullIcon,"qtg_status_battery.svg");
       
    81 
       
    82 */
    68 
    83 
    69 // ============================ MEMBER FUNCTIONS ==============================
    84 // ============================ MEMBER FUNCTIONS ==============================
    70 
    85 
    71 // ----------------------------------------------------------------------------
    86 // ----------------------------------------------------------------------------
    72 // CSysApAppUi::CSysApAppUi()
    87 // CSysApAppUi::CSysApAppUi()
   202     iSysApStartupController = CSysApStartupController::NewL( *this, iSysApFeatureManager->OfflineModeSupported() );
   217     iSysApStartupController = CSysApStartupController::NewL( *this, iSysApFeatureManager->OfflineModeSupported() );
   203 
   218 
   204     iActiveProfileBeforeOfflineMode = iSysApCenRepController->GetInt( KCRUidCoreApplicationUIsSysAp, KSysApProfileBeforeOfflineMode );    
   219     iActiveProfileBeforeOfflineMode = iSysApCenRepController->GetInt( KCRUidCoreApplicationUIsSysAp, KSysApProfileBeforeOfflineMode );    
   205            
   220            
   206     iSysApFeatureManager->FeatureVariationCheckDone();        
   221     iSysApFeatureManager->FeatureVariationCheckDone();        
       
   222     // iHbIndicatorSymbian = CHbIndicatorSymbian::NewL();
   207     
   223     
   208     TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApLightsController::NewL()") ) );
   224     TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApLightsController::NewL()") ) );
   209     iSysApLightsController = CSysApLightsController::NewL( *this,
   225     iSysApLightsController = CSysApLightsController::NewL( *this,
   210                                                            iSysApCenRepLightSettingsObserver->GetLightsTimeout(),
   226                                                            iSysApCenRepLightSettingsObserver->GetLightsTimeout(),
   211                                                            iSysApFeatureManager->CoverDisplaySupported() );
   227                                                            iSysApFeatureManager->CoverDisplaySupported() );
   226     if (keyManagementErr)
   242     if (keyManagementErr)
   227         {
   243         {
   228         TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL : CSysApKeyManagement::NewL returns error=%d"), keyManagementErr ) );
   244         TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL : CSysApKeyManagement::NewL returns error=%d"), keyManagementErr ) );
   229         }
   245         }
   230     
   246     
       
   247     // Initialize animdll for handling side volume keys
       
   248     // (needed before normal mode in case emergency number is dialed from PIN query)
       
   249     iSysApKeySndHandler = CSysApKeySndHandler::NewL(iEikonEnv->WsSession());
   231     iKeyguardController = CKeyguardAccessApi::NewL();
   250     iKeyguardController = CKeyguardAccessApi::NewL();
   232     TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApShutdownImage::NewL()") ) );
   251     TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApShutdownImage::NewL()") ) );
   233     iSysApShutdownImage = CSysApShutdownImage::NewL();//NULL; //
   252     iSysApShutdownImage = CSysApShutdownImage::NewL();//NULL; //
   234     
   253     
       
   254     // Initialize nsps handler. Needed for proper lights control during PIN query.
       
   255     TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: trying CSysApNspsHandler::NewL") ) );
       
   256     iSysApNspsHandler = CSysApNspsHandler::NewL( iEikonEnv->WsSession(), iSysApShutdownImage->ShutdownCoeControlWindow() );
       
   257 
   235     RProperty::Define( KPSUidCoreApplicationUIs,KCoreAppUIsPowerMenuCustomDialogStatus, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy );
   258     RProperty::Define( KPSUidCoreApplicationUIs,KCoreAppUIsPowerMenuCustomDialogStatus, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy );
   236     RProperty::Set( KPSUidCoreApplicationUIs, KCoreAppUIsPowerMenuCustomDialogStatus, ECoreAppUIsPowerMenuCustomDialogUninitialized );
   259     RProperty::Set( KPSUidCoreApplicationUIs, KCoreAppUIsPowerMenuCustomDialogStatus, ECoreAppUIsPowerMenuCustomDialogUninitialized );
       
   260     
       
   261 
       
   262                     
       
   263     // TBool result = HbTextResolverSymbian::Init(KPsmlocalisationfile, KtsfilePath);
   237     
   264     
   238     TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: END") ) );    
   265     TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: END") ) );    
   239     }
   266     }
   240 
   267 
   241 // ----------------------------------------------------------------------------
   268 // ----------------------------------------------------------------------------
   245 void CSysApAppUi::FreeResources()
   272 void CSysApAppUi::FreeResources()
   246     {
   273     {
   247     TRACES( RDebug::Print( _L("CSysApAppUi::FreeResources") ) );
   274     TRACES( RDebug::Print( _L("CSysApAppUi::FreeResources") ) );
   248     delete iSysApBatteryInfoController;
   275     delete iSysApBatteryInfoController;
   249     delete iSysApPsmController;
   276     delete iSysApPsmController;
       
   277     //delete iVariantAccState; 
       
   278 
   250     delete iSysApAudioRoutingObserver;
   279     delete iSysApAudioRoutingObserver;
   251 
   280 
   252     if ( iSapTimer )
   281     if ( iSapTimer )
   253         {
   282         {
   254         iSapTimer->Cancel();
   283         iSapTimer->Cancel();
   280     delete iSysApCenRepLogsObserver;
   309     delete iSysApCenRepLogsObserver;
   281     delete iSysApOfflineModeController;
   310     delete iSysApOfflineModeController;
   282     
   311     
   283     delete iSysApUsbIndicatorController;
   312     delete iSysApUsbIndicatorController;
   284     delete iKeyguardController;
   313     delete iKeyguardController;
   285     
   314     // delete iHbIndicatorSymbian; 
   286     delete iSysApKeyManagement;
   315     delete iSysApKeyManagement;
   287     iSysApKeyManagement = NULL;
   316     iSysApKeyManagement = NULL;
   288     
   317     
   289     REComSession::FinalClose();
   318     REComSession::FinalClose();
   290     iResourcesFreed = ETrue;
   319     iResourcesFreed = ETrue;
   375     TRACES( RDebug::Print(_L("CSysApAppUi::HandleUiReadyAfterBootL" ) ) );    
   404     TRACES( RDebug::Print(_L("CSysApAppUi::HandleUiReadyAfterBootL" ) ) );    
   376     TInt state( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) );
   405     TInt state( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) );
   377 
   406 
   378     UpdateBatteryBarsL( state );   
   407     UpdateBatteryBarsL( state );   
   379     DoSwStateNormalConstructionL();
   408     DoSwStateNormalConstructionL();
   380     HandleAccessoryProfileInStartupL();
   409     HandleAccessoryProfileInStartupL();       
       
   410    
       
   411     if ( !iSysApPsmController ) // created here if first state change has not occurred yet
       
   412        {
       
   413        iSysApPsmController = CSysApPsmController::NewL( *this );        
       
   414        }
   381 
   415 
   382     if ( iSysApPsmController )
   416     if ( iSysApPsmController )
   383         {
   417        {
   384         if ( iCharging ) // if charger is connected on boot PSM queries may need to be shown
   418         if ( iCharging ) // if charger is connected on boot PSM queries may need to be shown
   385             {
   419         {
   386             HandleChargingStatusL( StateOfProperty( KPSUidHWRMPowerState, KHWRMChargingStatus ) );
   420          HandleChargingStatusL( StateOfProperty( KPSUidHWRMPowerState, KHWRMChargingStatus ) );
   387             }
   421         }
   388         }
   422        }
   389     
   423     
   390     TInt batteryStatus = StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryStatus );
   424     TInt batteryStatus = StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryStatus );
   391     TRACES( RDebug::Print(_L("CSysApAppUi::HandleUiReadyAfterBootL: batteryStatus %d" ), batteryStatus ) );
   425     TRACES( RDebug::Print(_L("CSysApAppUi::HandleUiReadyAfterBootL: batteryStatus %d" ), batteryStatus ) );
   392     if(  batteryStatus == EBatteryStatusLow || batteryStatus == EBatteryStatusEmpty )
   426     if(  batteryStatus == EBatteryStatusLow || batteryStatus == EBatteryStatusEmpty )
   393         {
   427         {
   432         if ( !iSysApPsmController ) // created only in first state change
   466         if ( !iSysApPsmController ) // created only in first state change
   433             {
   467             {
   434             iSysApPsmController = CSysApPsmController::NewL( *this );        
   468             iSysApPsmController = CSysApPsmController::NewL( *this );        
   435             }
   469             }
   436 
   470 
   437         // in charger boot explicitly disable partial power save mode
   471         // in charger boot explicitly disable  power save mode
   438         if ( aSwState == RStarterSession::ECharging )
   472         if ( aSwState == RStarterSession::ECharging )
   439             {
   473             {
   440             iSysApPsmController->ChargerConnected();
   474             iSysApPsmController->ChargerConnected();
   441             iSysApPsmController->DoEnablePartialPsm( EFalse ); // disable partial power save now
   475             iSysApPsmController->DoEnablePartialPsm( EFalse ); // disable  power save now
   442             }
   476             }
   443         }
   477         }
   444 
   478 
   445     if ( aSwState == RStarterSession::ECharging || aSwState == RStarterSession::EAlarm )
   479     if ( aSwState == RStarterSession::ECharging || aSwState == RStarterSession::EAlarm )
   446         {
   480         {
   494     TRACES( RDebug::Print( _L("~CSysApAppUi() started") ) );
   528     TRACES( RDebug::Print( _L("~CSysApAppUi() started") ) );
   495     if( !iResourcesFreed )
   529     if( !iResourcesFreed )
   496       {
   530       {
   497         FreeResources();
   531         FreeResources();
   498       }
   532       }
       
   533     delete iSysApStartupController;
   499     }
   534     }
   500         
   535         
   501 TBool CSysApAppUi::ResourcesFreed() const
   536 TBool CSysApAppUi::ResourcesFreed() const
   502     {
   537     {
   503     return iResourcesFreed;
   538     return iResourcesFreed;
   766         {
   801         {
   767         return;
   802         return;
   768         }
   803         }
   769 #endif // SYSAP_USE_STARTUP_UI_PHASE
   804 #endif // SYSAP_USE_STARTUP_UI_PHASE
   770 
   805 
       
   806 #if 0 // Not used as of now
   771     SetHacIndicatorL();
   807     SetHacIndicatorL();
       
   808 #endif //0	
   772     }
   809     }
   773 
   810 
   774 // ----------------------------------------------------------------------------
   811 // ----------------------------------------------------------------------------
   775 // CSysApAppUi::UiReady()
   812 // CSysApAppUi::UiReady()
   776 // 
   813 // 
  1580     // will take care in next sub
  1617     // will take care in next sub
  1581     
  1618     
  1582     switch ( aStatus )
  1619     switch ( aStatus )
  1583         {
  1620         {
  1584         case MSysApPsmControllerNotifyCallback::EPsmActivationComplete:
  1621         case MSysApPsmControllerNotifyCallback::EPsmActivationComplete:
  1585             UpdateBatteryBarsL( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) );
  1622              UpdateBatteryBarsL( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) );
  1586             ShowUiNoteL( EPowerSaveModeActivated );
  1623              ShowUiNoteL( EPowerSaveModeActivated );
  1587             break;
  1624              break;
  1588         
  1625         
  1589         case MSysApPsmControllerNotifyCallback::EPsmDeactivationComplete:
  1626         case MSysApPsmControllerNotifyCallback::EPsmDeactivationComplete:
  1590             UpdateBatteryBarsL( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) );
  1627              UpdateBatteryBarsL( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) );
  1591             ShowUiNoteL( EPowerSaveModeDeactivated );
  1628              ShowUiNoteL( EPowerSaveModeDeactivated );
  1592             break;
  1629              break;
  1593             
  1630             
  1594         case MSysApPsmControllerNotifyCallback::EPsmActivationFailed:
  1631         case MSysApPsmControllerNotifyCallback::EPsmActivationFailed:
  1595             ShowUiNoteL( ECannotActivatePowerSaveMode );
  1632             ShowUiNoteL( ECannotActivatePowerSaveMode );
  1596             break;
  1633             break;
  1597             
  1634             
  1805         {
  1842         {
  1806         if ( iSysApPsmController && UiReady() )
  1843         if ( iSysApPsmController && UiReady() )
  1807             {
  1844             {
  1808             iSysApPsmController->BatteryLow( ETrue );
  1845             iSysApPsmController->BatteryLow( ETrue );
  1809             
  1846             
       
  1847                        
  1810             if ( iSysApPsmController->ShowActivateQuery())
  1848             if ( iSysApPsmController->ShowActivateQuery())
  1811                 {
  1849                 {
  1812                 // show activation query, replaces the first battery low query
  1850                 // show activation query, replaces the first battery low query
  1813                 ShowQueryL( ESysApBattLowPowerSavingQuery );
  1851                 ShowQueryL( ESysApBattLowPowerSavingQuery );
  1814                 }
  1852                 }
  1821                 }                
  1859                 }                
  1822             }
  1860             }
  1823         else
  1861         else
  1824             {
  1862             {
  1825             //Display Battery Low note.
  1863             //Display Battery Low note.
  1826             ShowUiNoteL( EBatteryLowNote );    
  1864             ShowUiNoteL( EBatteryLowNote );     
  1827             }            
  1865             }            
  1828         }
  1866         }
  1829     
  1867         
  1830     if ( iSysApBatteryInfoController )
  1868     if ( iSysApBatteryInfoController )
  1831         {
  1869     {
  1832         iSysApBatteryInfoController->BatteryStatusUpdated( aValue );
  1870      iSysApBatteryInfoController->BatteryStatusUpdated( aValue );
  1833         }
  1871     }
  1834             
  1872       
  1835     }
  1873    }
  1836 
  1874 
  1837 // ----------------------------------------------------------------------------
  1875 // ----------------------------------------------------------------------------
  1838 // CSysApAppUi::ShowUiNoteL( const TSysApNoteIds aNote ) const
  1876 // CSysApAppUi::ShowUiNoteL( const TSysApNoteIds aNote ) const
  1839 // ----------------------------------------------------------------------------
  1877 // ----------------------------------------------------------------------------
  1840 
  1878 
  1893                 CleanupStack::PopAndDestroy(); // aString
  1931                 CleanupStack::PopAndDestroy(); // aString
  1894                 }
  1932                 }
  1895                 break;
  1933                 break;
  1896             case EBatteryFullUnplugChargerNote:
  1934             case EBatteryFullUnplugChargerNote:
  1897                 {
  1935                 {
  1898                   iSysApLightsController->BatteryEmptyL( ETrue );
  1936                 /*	
  1899                   _LIT(KPowerPressKey,"Charging complete. Unplug charger to save energy.");
  1937                 TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) ); 
  1900                   HBufC* aString = HBufC16::NewLC(200);
  1938                 iSysApLightsController->BatteryEmptyL( ETrue );
       
  1939                  _LIT(KunplugCharger,"txt_power_dpopinfo_unplug_charger_to_save_energy");                 
       
  1940                  HBufC* unplugCharger = HbTextResolverSymbian::LoadL(KunplugCharger);
       
  1941                  _LIT(KbatteryFull,"txt_power_management_dpophead_100_full");
       
  1942                  HBufC* batteryFull = HbTextResolverSymbian::LoadL(KbatteryFull);
       
  1943                  CHbDeviceNotificationDialogSymbian::NotificationL(KbatteryFullIcon,*unplugCharger,*batteryFull);  
       
  1944                  */
       
  1945                  
       
  1946                  iSysApLightsController->BatteryEmptyL( ETrue );
       
  1947                  _LIT(KPowerPressKey,"Charging complete. Unplug charger to save energy.");
       
  1948                  HBufC* aString = HBufC16::NewLC(200);
  1901                  TPtrC aStringPointer = aString->Des();
  1949                  TPtrC aStringPointer = aString->Des();
  1902                   aStringPointer.Set(KPowerPressKey);
  1950                  aStringPointer.Set(KPowerPressKey);
  1903                  TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) );   
  1951                  TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) );   
  1904                  ShowExampleUiNoteL( aStringPointer );
  1952                  ShowExampleUiNoteL( aStringPointer );
  1905                  CleanupStack::PopAndDestroy(); // aString
  1953                  CleanupStack::PopAndDestroy(); // aString     
  1906                  }
  1954                  }
  1907                 break;
  1955                 break;
  1908             case EUnplugChargerNote:
  1956             case EUnplugChargerNote:
  1909                 {
  1957                 {
  1910                 _LIT(KPowerPressKey,"Unplug charger from power supply to save energy");
  1958                 _LIT(KPowerPressKey,"Unplug charger from power supply to save energy");
  1961     if ( iSysApPsmController && UiReady() ) 
  2009     if ( iSysApPsmController && UiReady() ) 
  1962         {             
  2010         {             
  1963         if ( iCharging && !iSysApPsmController->ChargerConnected() ) // first time after charger connection
  2011         if ( iCharging && !iSysApPsmController->ChargerConnected() ) // first time after charger connection
  1964             {
  2012             {
  1965             iSysApPsmController->ConnectCharger( ETrue );
  2013             iSysApPsmController->ConnectCharger( ETrue );
  1966             
       
  1967             if ( iSysApPsmController->ShowDeactivateQuery() )
  2014             if ( iSysApPsmController->ShowDeactivateQuery() )
  1968                 {
  2015                 {
  1969                 ShowQueryL( ESysApBattChargingPowerSavingQuery );
  2016                 ShowQueryL( ESysApBattChargingPowerSavingQuery );
  1970                 // Query is on the display. Don't show the note.
  2017                 // Query is on the display. Don't show the note.
  1971                 showNote = EFalse;               
  2018                 showNote = EFalse;               
  1972                 }
  2019                 }
  1973             else
  2020             else
  1974                 {
  2021                 {
  1975                 iSysApPsmController->DoEnablePartialPsm( EFalse );
  2022                 iSysApPsmController->DoEnablePartialPsm( EFalse );
  1976                 }                
  2023                 }              
  1977             }
  2024             }
  1978         else if ( aValue == EChargingStatusNotConnected )
  2025         else if ( aValue == EChargingStatusNotConnected )
  1979             {
  2026             {
  1980             iSysApPsmController->ConnectCharger( EFalse );
  2027             iSysApPsmController->ConnectCharger( EFalse );
  1981             }            
  2028             }            
  2101             {
  2148             {
  2102             // deactivate psm indicator
  2149             // deactivate psm indicator
  2103             }            
  2150             }            
  2104         }
  2151         }
  2105         
  2152         
  2106     if ( iSysApBatteryInfoController )        
  2153        if ( iSysApBatteryInfoController )        
  2107         {
  2154         {
  2108         iSysApBatteryInfoController->BatteryLevelUpdatedL();
  2155          iSysApBatteryInfoController->BatteryLevelUpdatedL();
  2109         }
  2156         }
  2110     }
  2157         
       
  2158      }
  2111 
  2159 
  2112 
  2160 
  2113 
  2161 
  2114 // ----------------------------------------------------------------------------
  2162 // ----------------------------------------------------------------------------
  2115 // CSysApAppUi::ShowChargingNoteL()
  2163 // CSysApAppUi::ShowChargingNoteL()
  2130             showNote = EFalse;
  2178             showNote = EFalse;
  2131             }
  2179             }
  2132         TRACES( RDebug::Print( _L("CSysApAppUi::ShowChargingNoteL KCTsyCallState=%d"), StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) ) );
  2180         TRACES( RDebug::Print( _L("CSysApAppUi::ShowChargingNoteL KCTsyCallState=%d"), StateOfProperty( KPSUidCtsyCallInformation, KCTsyCallState ) ) );
  2133         if ( showNote ) // Power Mgmt UI spec defines that no Charging note is shown while the phone is ringing/alerting
  2181         if ( showNote ) // Power Mgmt UI spec defines that no Charging note is shown while the phone is ringing/alerting
  2134             {
  2182             {
       
  2183             /* 
       
  2184             TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) );   
       
  2185             _LIT(KChargingNote,"txt_power_management_dblist_charging");
       
  2186             HBufC* chargingNote = HbTextResolverSymbian::LoadL(KChargingNote);
       
  2187             CHbDeviceNotificationDialogSymbian::NotificationL(KNullDesC,*chargingNote);     
       
  2188             */
       
  2189              
  2135             _LIT(KChargingNote,"Charging");
  2190             _LIT(KChargingNote,"Charging");
  2136             HBufC* aString = HBufC16::NewLC(50);
  2191             HBufC* aString = HBufC16::NewLC(50);
  2137             TPtrC aStringPointer = aString->Des();
  2192             TPtrC aStringPointer = aString->Des();
  2138             aStringPointer.Set(KChargingNote);
  2193             aStringPointer.Set(KChargingNote);
  2139             TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) );   
  2194             TRACES( RDebug::Print( _L("CSysApWsClient::RunL(): Key EEventKeyUp 01") ) );   
  2537             {
  2592             {
  2538             TRACES( RDebug::Print( _L("e_KEY_EVENT_SENDING 0") ) );
  2593             TRACES( RDebug::Print( _L("e_KEY_EVENT_SENDING 0") ) );
  2539             }
  2594             }
  2540 #endif // _DEBUG
  2595 #endif // _DEBUG
  2541 
  2596 
  2542         TKeyResponse response( EKeyWasNotConsumed );
  2597         TKeyResponse response(EKeyWasNotConsumed);
       
  2598         if (response)
       
  2599             {
       
  2600             //Do nothing:: To supress warning
       
  2601             }
  2543         if (iSysApKeyManagement && aKeyEvent.iCode != EKeyPowerOff && aKeyEvent.iCode != 'E')
  2602         if (iSysApKeyManagement && aKeyEvent.iCode != EKeyPowerOff && aKeyEvent.iCode != 'E')
  2544             {
  2603             {
  2545             response = iSysApKeyManagement->HandleKeyEventL(aKeyEvent, aType );
  2604             response = iSysApKeyManagement->HandleKeyEventL(aKeyEvent, aType );
  2546             }
  2605             }
  2547         
  2606