# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1284542147 -10800 # Node ID 41fba8bcf7b72078516f5b93296aa776fa654598 # Parent c6bafb5162d8b697f60f254499e33d051d225959 Revision: 201034 Kit: 201036 diff -r c6bafb5162d8 -r 41fba8bcf7b7 voicerecorder/RecViewInc/CVRRecView.h --- a/voicerecorder/RecViewInc/CVRRecView.h Wed Sep 01 12:29:14 2010 +0100 +++ b/voicerecorder/RecViewInc/CVRRecView.h Wed Sep 15 12:15:47 2010 +0300 @@ -410,6 +410,12 @@ * Context that is used to activate model */ TVRRecViewContexts iContext; + + /** + * Own: Indicates USB connection dialog is open or not. + * If value is ETrue, don't try to open it again. + */ + TBool iUSBConnectedDialogOpen; }; #endif // __CVRRECVIEW_H__ diff -r c6bafb5162d8 -r 41fba8bcf7b7 voicerecorder/RecViewSrc/CVRRecView.cpp --- a/voicerecorder/RecViewSrc/CVRRecView.cpp Wed Sep 01 12:29:14 2010 +0100 +++ b/voicerecorder/RecViewSrc/CVRRecView.cpp Wed Sep 15 12:15:47 2010 +0300 @@ -1054,8 +1054,18 @@ == iModel->VisualStateId() || EStateIdleRecordEmbedded == iModel->VisualStateId()) { - ShowDialogForWaitUSBPluggingOutL(); - AppUi()->Exit(); + if ( !iUSBConnectedDialogOpen ) + { + iUSBConnectedDialogOpen = ETrue; + TRAPD( err, ShowDialogForWaitUSBPluggingOutL() ); + iUSBConnectedDialogOpen = EFalse; + User::LeaveIfError( err ); + AppUi()->Exit(); + } + else + { + return KErrNone; + } } HandleCommandL(ECmdUSBChange);