securitydialogs/Autolock/src/AutoLockLockObserver.cpp
branchRCL_3
changeset 8 ece4bbb094df
parent 0 164170e6151a
equal deleted inserted replaced
7:6e226572c5f0 8:ece4bbb094df
    19 
    19 
    20 #include		<bldvariant.hrh>
    20 #include		<bldvariant.hrh>
    21 #include		<e32property.h>
    21 #include		<e32property.h>
    22 #include	<PSVariables.h>
    22 #include	<PSVariables.h>
    23 #include		<coreapplicationuisdomainpskeys.h>
    23 #include		<coreapplicationuisdomainpskeys.h>
    24 #include <SCPClient.h>	// EMKK-7N3G7R
    24 
    25 #include		<startupdomainpskeys.h>	// EMKK-7N3G7R
       
    26 #include <mmtsy_names.h>	// EMKK-7N3G7R 
       
    27 #include	"AutoLockLockObserverPS.h"
    25 #include	"AutoLockLockObserverPS.h"
    28 #include	"AutolockAppUiPS.h"
    26 #include	"AutolockAppUiPS.h"
    29 #include	"AutoLockModelPS.h"
    27 #include	"AutoLockModelPS.h"
    30 
    28 
    31 
    29 
    52 //
    50 //
    53 CLockObserver::~CLockObserver()
    51 CLockObserver::~CLockObserver()
    54 		{
    52 		{
    55 		Cancel();
    53 		Cancel();
    56 		iProperty.Close();
    54 		iProperty.Close();
    57 #ifdef FF_STARTUP_OMA_DM_SUPPORT	// New booting order	Start	EMKK-7N3G7R			
       
    58 		delete wait;
       
    59 		if (iServer.Handle())
       
    60 			{						
       
    61 				iServer.UnloadPhoneModule(KMmTsyModuleName);
       
    62 				iServer.Close();
       
    63 			}
       
    64 #endif	// End EMKK-7N3G7R	
       
    65 		}
    55 		}
    66 //
    56 //
    67 // ----------------------------------------------------------
    57 // ----------------------------------------------------------
    68 // CNoSimCard::Start()
    58 // CNoSimCard::Start()
    69 // Starts	listening	KUidAutolockStatus event 
    59 // Starts	listening	KUidAutolockStatus event 
    95 // ----------------------------------------------------------
    85 // ----------------------------------------------------------
    96 // 
    86 // 
    97 void CLockObserver::ConstructL()
    87 void CLockObserver::ConstructL()
    98 		{
    88 		{
    99 	    
    89 	    
   100 		#if	defined(_DEBUG)	
    90 	#if	defined(_DEBUG)	
   101         RDebug::Print(_L("(AUTOLOCK)CLockObserver::ConstructL()"));
    91     RDebug::Print(_L("(AUTOLOCK)CLockObserver::ConstructL()"));
   102     #endif
    92     #endif
   103         
    93         
   104 		// Add this	active object	to the scheduler.
    94 		// Add this	active object	to the scheduler.
   105 	CActiveScheduler::Add(this);
    95 	CActiveScheduler::Add(this);
       
    96 	    
   106 	TInt ret;
    97 	TInt ret;
   107 	_LIT_SECURITY_POLICY_PASS(KReadPolicy);	
    98 	_LIT_SECURITY_POLICY_PASS(KReadPolicy);	
   108 	_LIT_SECURITY_POLICY_C1(KWritePolicy,	ECapabilityWriteDeviceData);
    99 	_LIT_SECURITY_POLICY_C1(KWritePolicy,	ECapabilityWriteDeviceData);
   109 	
   100 	
   110 	ret	=	RProperty::Define(KPSUidCoreApplicationUIs,	KCoreAppUIsAutolockStatus, RProperty::EInt,	KReadPolicy, KWritePolicy);
   101 	ret	=	RProperty::Define(KPSUidCoreApplicationUIs,	KCoreAppUIsAutolockStatus, RProperty::EInt,	KReadPolicy, KWritePolicy);