equal
deleted
inserted
replaced
476 break; |
476 break; |
477 } |
477 } |
478 } |
478 } |
479 |
479 |
480 if ( state != EDisabled ) |
480 if ( state != EDisabled ) |
|
481 if(iActiveVolumeControl != NULL) |
481 { |
482 { |
482 iNaviPane->PushL( *iActiveVolumeControl ); |
483 iNaviPane->PushL( *iActiveVolumeControl ); |
483 CAknVolumeControl* control = static_cast< CAknVolumeControl* >( |
484 CAknVolumeControl* control = static_cast< CAknVolumeControl* >( |
484 iActiveVolumeControl->DecoratedControl() ); |
485 iActiveVolumeControl->DecoratedControl() ); |
485 |
486 |
549 // |
550 // |
550 TInt CVRRecViewContainer::HandleVolumeChangeL( const TKeyEvent& aKeyEvent, |
551 TInt CVRRecViewContainer::HandleVolumeChangeL( const TKeyEvent& aKeyEvent, |
551 TEventCode aType ) |
552 TEventCode aType ) |
552 { |
553 { |
553 |
554 |
554 if( !iActiveVolumeControl || !iVolumeChangeObserver->CanSetVolume() ) |
555 if( iActiveVolumeControl == NULL || iVolumeChangeObserver == NULL || !iVolumeChangeObserver->CanSetVolume() ) |
555 { |
556 { |
556 // Can't process volume change yet |
557 // Can't process volume change yet |
557 return KErrNotReady; |
558 return KErrNotReady; |
558 } |
559 } |
559 |
560 |
657 { |
658 { |
658 switch( aEventType ) |
659 switch( aEventType ) |
659 { |
660 { |
660 case EEventStateChanged: |
661 case EEventStateChanged: |
661 { |
662 { |
662 if ( aControl == static_cast< CAknVolumeControl*>(iActiveVolumeControl->DecoratedControl())) |
663 if ( iActiveVolumeControl && aControl == static_cast< CAknVolumeControl*>(iActiveVolumeControl->DecoratedControl())) |
663 { |
664 { |
664 if( !iActiveVolumeControl || !iVolumeChangeObserver->CanSetVolume() ) |
665 if(iVolumeChangeObserver == NULL || !iVolumeChangeObserver->CanSetVolume() ) |
665 { |
666 { |
666 // Can't process volume change yet |
667 // Can't process volume change yet |
667 User::Leave(KErrNotReady); |
668 User::Leave(KErrNotReady); |
668 } |
669 } |
669 |
670 |
692 } |
693 } |
693 appUi->KeySounds()->PlaySound( sid ); |
694 appUi->KeySounds()->PlaySound( sid ); |
694 User::Leave(KErrTooBig); |
695 User::Leave(KErrTooBig); |
695 } |
696 } |
696 } |
697 } |
|
698 else if(iActiveVolumeControl == NULL) |
|
699 { |
|
700 User::Leave(KErrNotReady); |
|
701 } |
697 } |
702 } |
698 default: |
703 default: |
699 break; |
704 break; |
700 } |
705 } |
701 } |
706 } |