vtengines/videoteleng/Src/Base/CVtEngDeviceLockMonitor.cpp
branchRCL_3
changeset 34 f15ac8e65a02
parent 32 890b5dd735f8
child 35 779871d1e4f4
equal deleted inserted replaced
32:890b5dd735f8 34:f15ac8e65a02
    56     {
    56     {
    57     __VTPRINTENTER( "LockMonitor.NotifyState" )
    57     __VTPRINTENTER( "LockMonitor.NotifyState" )
    58 
    58 
    59     TInt state = EAutolockStatusUninitialized;
    59     TInt state = EAutolockStatusUninitialized;
    60 
    60 
    61     // Get autolock state
    61 	// Get autolock state
    62     TInt err = iAutolockListener->Get( state );
    62 	TInt err = iAutolockListener->Get( state );
    63 
    63 
    64     __VTPRINT2( DEBUG_GEN, "LockMonitor Get err: %d", err );
    64 	__VTPRINT2( DEBUG_GEN, "LockMonitor Get err: %d", err );
    65     __VTPRINT2( DEBUG_GEN, "LockMonitor state: %d", state );
    65 	__VTPRINT2( DEBUG_GEN, "LockMonitor state: %d", state );
    66       
    66 
    67     // Recognize the uninitialized state as autolock on, or the VT will be wrongly shown when startup & lock is on.
    67 	if( err == KErrNone )
    68     if( err == KErrNone )
       
    69 		{
    68 		{
    70 		const TInt event =
    69 		const TInt event =
    71         ( state == EAutolockOff ) ?
    70         ( state <= EAutolockOff ) ?
    72                 KVtEngDeviceLockOff : KVtEngDeviceLockOn;
    71                 KVtEngDeviceLockOff : KVtEngDeviceLockOn;
    73     CVtEngEventManager::NotifyEvent( event );
    72         CVtEngEventManager::NotifyEvent( event );
    74     }	
    73         }		
       
    74 			
    75     __VTPRINTEXIT( "LockMonitor.NotifyState" )
    75     __VTPRINTEXIT( "LockMonitor.NotifyState" )
    76     }
    76     }
    77 
    77 
    78 // -----------------------------------------------------------------------------
    78 // -----------------------------------------------------------------------------
    79 // CVtEngDeviceLockMonitor::HandleNotifyPSL
    79 // CVtEngDeviceLockMonitor::HandleNotifyPSL