--- 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__
--- 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);