# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1273584905 -10800 # Node ID c45d4fe2ff0a37a8490fe2d98d259892242bdb21 # Parent 22c3c67e5001dafdf8fe62f9294a9e03f6184248 Revision: 201017 Kit: 201019 diff -r 22c3c67e5001 -r c45d4fe2ff0a accesspointcontrol/apcontrollistplugin/src/apcontrollistplugin.cpp --- a/accesspointcontrol/apcontrollistplugin/src/apcontrollistplugin.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/accesspointcontrol/apcontrollistplugin/src/apcontrollistplugin.cpp Tue May 11 16:35:05 2010 +0300 @@ -193,24 +193,24 @@ iContainer = NULL; User::Leave( error ); } + + AppUi()->AddToViewStackL( *this, iContainer ); + iContainer->HandleResourceChange(KEikDynamicLayoutVariantSwitch); - if (!iAPIWrapper) - { - iAPIWrapper = new( ELeave ) CAPControlListAPIWrapper(*this); - iAPIWrapper->ConstructL(); - } - if (!iChangeNotifier) - { - iChangeNotifier = new( ELeave ) CAPControlListCapsChange(*this); + if (!iAPIWrapper) + { + iAPIWrapper = new( ELeave ) CAPControlListAPIWrapper(*this); + iAPIWrapper->ConstructL(); + } + if (!iChangeNotifier) + { + iChangeNotifier = new( ELeave ) CAPControlListCapsChange(*this); iChangeNotifier->NotifyCapsChange(); - } + } - ShowInfoNoteL(R_QTN_ACL_WAIT_READING_SIM); - iAPIWrapper->ReadData(); + ShowInfoNoteL(R_QTN_ACL_WAIT_READING_SIM); + iAPIWrapper->ReadData(); iContainer->HandleResourceChange(KEikDynamicLayoutVariantSwitch); - - - AppUi()->AddToViewStackL( *this, iContainer ); } CLOG( ( ESelector, 0, _L( "<- CAPControlListPlugin::DoActivateL" ) ) ); } diff -r 22c3c67e5001 -r c45d4fe2ff0a bearermanagement/S60MCPR/inc/s60mcpractivities.h --- a/bearermanagement/S60MCPR/inc/s60mcpractivities.h Tue Apr 27 17:03:25 2010 +0300 +++ b/bearermanagement/S60MCPR/inc/s60mcpractivities.h Tue May 11 16:35:05 2010 +0300 @@ -608,22 +608,7 @@ NetStateMachine::MStateFork, TContext ) virtual TInt TransitionTag(); - DECLARE_SMELEMENT_FOOTER( TNoTagOrInformMigrationAvailableBackwardsOrErrorOrCancel ) - - /** - * FORK/DECISION: - * 1. Inform that the migration complete or go to error - * 2. Error - * @return - */ - DECLARE_SMELEMENT_HEADER( TInformMigrationCompletedOrError, - MeshMachine::TStateFork, - NetStateMachine::MStateFork, - TContext ) - virtual TInt TransitionTag(); - DECLARE_SMELEMENT_FOOTER( TInformMigrationCompletedOrError ) - - + DECLARE_SMELEMENT_FOOTER( TNoTagOrInformMigrationAvailableBackwardsOrErrorOrCancel ) /** * Class that is responsible for managing mobility on MCPR side. @@ -802,21 +787,6 @@ CS60MobilityActivity::TContext ) virtual TInt TransitionTag(); DECLARE_SMELEMENT_FOOTER( TNoTagOrApplicationRejectedMigrationOrCancel ) - - /** - * FORK/DECISION: - * 1. Proceed to reconnection - * 2. Re-establish connection to the same IAP, inform data client that migration is complete - * 3. Error - * @return - */ - DECLARE_SMELEMENT_HEADER( TNoTagOrRequestReConnectToCurrentSPOrErrorTag, - MeshMachine::TStateFork, - NetStateMachine::MStateFork, - TContext ) - virtual TInt TransitionTag(); - DECLARE_SMELEMENT_FOOTER( TNoTagOrRequestReConnectToCurrentSPOrErrorTag ) - /** * Mutex protected TRANSITION. diff -r 22c3c67e5001 -r c45d4fe2ff0a bearermanagement/S60MCPR/inc/s60mcprstates.h --- a/bearermanagement/S60MCPR/inc/s60mcprstates.h Tue Apr 27 17:03:25 2010 +0300 +++ b/bearermanagement/S60MCPR/inc/s60mcprstates.h Tue May 11 16:35:05 2010 +0300 @@ -106,17 +106,6 @@ TContext ) virtual void DoL(); DECLARE_SMELEMENT_FOOTER( TRequestReConnect ) - - /** - * TRANSITION/ACTION: Starts ReConnect -activity to current service provider - */ - DECLARE_SMELEMENT_HEADER( TRequestReConnectToCurrentSP, - MeshMachine::TStateTransition, - NetStateMachine::MStateTransition, - TContext ) - virtual void DoL(); - DECLARE_SMELEMENT_FOOTER( TRequestReConnectToCurrentSP ) - /** * TRANSITION/ACTION: Requests Policy Server to process the error. diff -r 22c3c67e5001 -r c45d4fe2ff0a bearermanagement/S60MCPR/src/s60mcpractivities.cpp --- a/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Tue May 11 16:35:05 2010 +0300 @@ -294,22 +294,17 @@ NODEACTIVITY_ENTRY( KNoTag, MCprStates::TSelectNextLayer, MCprStates::TAwaitingSelectNextLayerCompleted, // Ok. Error is fatal. - CS60MobilityActivity::TNoTagOrRequestReConnectToCurrentSPOrErrorTag ) + MeshMachine::TNoTagOrErrorTag ) // For the moment it is sufficient to use the re-connect activity, in the future we may want to // customise the behavior, for example start the new layer before rebinding it, etc. NODEACTIVITY_ENTRY( KNoTag, S60MCprStates::TRequestReConnect, MCprStates::TAwaitingReConnectCompleteOrError, // Ok. Error is fatal. - S60MCprMobilityActivity::TInformMigrationCompletedOrError ) //Own error handling MPM must be informed when error happens. + MeshMachine::TNoTagOrErrorTag ) //Own error handling MPM must be informed when error happens. - NODEACTIVITY_ENTRY( S60MCprStates::KRequestReConnectToCurrentSP, - S60MCprStates::TRequestReConnectToCurrentSP, - MCprStates::TAwaitingReConnectCompleteOrError, - S60MCprMobilityActivity::TInformMigrationCompletedOrError ) - // If the migration was acepted we loop again waiting for a new, preferred one - NODEACTIVITY_ENTRY( S60MCprStates::KInformMigrationCompleted, + NODEACTIVITY_ENTRY( KNoTag, CS60MobilityActivity::TInformMigrationCompleted, S60MCprMobilityActivity::TAwaitingMigrationAcceptedOrRejectedOrStartupErrorIgnoredOrCancel, S60MCprMobilityActivity::TNoTagOrErrorTagOrApplicationRejectedOrConsumeRejected ) diff -r 22c3c67e5001 -r c45d4fe2ff0a bearermanagement/S60MCPR/src/s60mcprmobilityactivity.cpp --- a/bearermanagement/S60MCPR/src/s60mcprmobilityactivity.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcprmobilityactivity.cpp Tue May 11 16:35:05 2010 +0300 @@ -198,24 +198,6 @@ // else cancel return KCancelTag | NetStateMachine::EForward; } - - // ----------------------------------------------------------------------------- - // S60MCprMobilityActivity::TInformMigrationCompletedOrError::TransitionTag - // ----------------------------------------------------------------------------- - // - DEFINE_SMELEMENT( TInformMigrationCompletedOrError, NetStateMachine::MStateFork, TContext ) - TBool TInformMigrationCompletedOrError::TransitionTag() - { - // Error notification falls into the error -case. - if ( iContext.iNodeActivity->Error() ) - { - return MeshMachine::KErrorTag | NetStateMachine::EForward; - } - else - { - return S60MCprStates::KInformMigrationCompleted; - } - } // ----------------------------------------------------------------------------- // S60MCprMobilityActivity::TStartMobilityHandshakeBackwardsOrError::TransitionTag @@ -695,36 +677,6 @@ } // ----------------------------------------------------------------------------- - // CS60MobilityActivity::TNoTagOrRequestReConnectToCurrentSPOrErrorTag::DoL - // ----------------------------------------------------------------------------- - // - DEFINE_SMELEMENT( CS60MobilityActivity::TNoTagOrRequestReConnectToCurrentSPOrErrorTag, - NetStateMachine::MStateFork, CS60MobilityActivity::TContext ) - TInt CS60MobilityActivity::TNoTagOrRequestReConnectToCurrentSPOrErrorTag::TransitionTag() - { - CS60MetaConnectionProvider& node = (CS60MetaConnectionProvider&)iContext.Node(); - RMetaServiceProviderInterface* sp = (RMetaServiceProviderInterface*)node.ServiceProvider(); - - if ( iContext.iNodeActivity->Error() ) - { - S60MCPRLOGSTRING1("S60MCPR<%x>::TNoTagOrBearerPresentOrError::TransitionTag() KErrorTag",(TInt*)&iContext.Node()) - return MeshMachine::KErrorTag | NetStateMachine::EForward; - } - // Check whether we're bound to a provider for the given IAP ID already - else if (sp && sp->ProviderInfo().APId() == node.PolicyPrefs().IapId()) - { - // Restart the whole layer - S60MCPRLOGSTRING1("S60MCPR<%x>::TNoTagOrBearerPresentOrError::TransitionTag() Re-establishment",(TInt*)&iContext.Node()); - return S60MCprStates::KRequestReConnectToCurrentSP | NetStateMachine::EForward; - } - else - { - S60MCPRLOGSTRING1("S60MCPR<%x>::TNoTagOrBearerPresentOrError::TransitionTag() KNoTag",(TInt*)&iContext.Node()) - return MeshMachine::KNoTag | NetStateMachine::EForward; - } - } - - // ----------------------------------------------------------------------------- // CS60MobilityActivity::ClearHandshakingFlag // ----------------------------------------------------------------------------- // diff -r 22c3c67e5001 -r c45d4fe2ff0a bearermanagement/S60MCPR/src/s60mcprstates.cpp --- a/bearermanagement/S60MCPR/src/s60mcprstates.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcprstates.cpp Tue May 11 16:35:05 2010 +0300 @@ -129,7 +129,6 @@ iContext.Node().GetClientIter(TClientType(TCFClientType::EServProvider)); RMetaServiceProviderInterface* itf = NULL; - //RNodeInterface* itf = NULL; for ( itf = (RMetaServiceProviderInterface*)iter++; ( itf != NULL && ( stoppingSP == NULL || startingSP == NULL ) ); @@ -155,13 +154,13 @@ // } } - // One must be started since this is already a reconnection - if ( stoppingSP==NULL ) + + if ( stoppingSP == NULL ) { - // Indication of a serious problem. - S60MCPRLOGSTRING1("S60MCPR<%x>::TRequestReConnect::DoL() - started service provider not found.",(TInt*)&iContext.Node()) - ASSERT( EFalse ); - User::Leave( KErrCorrupt ); // codescanner::leave + // If the above loop did not select a stoppingSP, the only reasonable chance is that + // this is one of the rare cases where reconnection is done to the same service provider. + S60MCPRLOGSTRING1("S60MCPR<%x>::TRequestReConnect::DoL() - reconnection to same service provider",(TInt*)&iContext.Node()) + stoppingSP = startingSP; } //If there is no other Service Provider to try, return KErrNotFound @@ -180,28 +179,7 @@ startingSP->RecipientId()).CRef() ); } -// ----------------------------------------------------------------------------- -// TRequestReConnectToCurrentSP::DoL -// ----------------------------------------------------------------------------- -// -DEFINE_SMELEMENT( TRequestReConnectToCurrentSP, NetStateMachine::MStateTransition, TContext ) -void TRequestReConnectToCurrentSP::DoL() // codescanner::leave - { - __ASSERT_DEBUG(iContext.iNodeActivity, User::Panic(KS60MCprPanic, KPanicNoActivity)); - S60MCPRLOGSTRING1("S60MCPR<%x>::TRequestReConnectToCurrentSP::DoL()",(TInt*)&iContext.Node()) - RNodeInterface* currentSP = iContext.Node().ServiceProvider(); - // There MUST be a service provider - __ASSERT_DEBUG( currentSP != NULL, User::Panic(KS60MCprPanic, KPanicNoServiceProvider)); - - // Diagnostic - there must be a data client or we cannot be here - __ASSERT_DEBUG(iContext.Node().GetFirstClient(TClientType(TCFClientType::EData)), - User::Panic(KS60MCprPanic, KPanicNoDataClient)); - - iContext.iNodeActivity->PostRequestTo( iContext.NodeId(), - TCFMcpr::TReConnect( currentSP->RecipientId(), - currentSP->RecipientId()).CRef() ); - } // ----------------------------------------------------------------------------- // TProcessError::DoL // ----------------------------------------------------------------------------- diff -r 22c3c67e5001 -r c45d4fe2ff0a bearermanagement/mpm/src/mpmiapselection.cpp --- a/bearermanagement/mpm/src/mpmiapselection.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/bearermanagement/mpm/src/mpmiapselection.cpp Tue May 11 16:35:05 2010 +0300 @@ -122,6 +122,11 @@ snap ) iChooseIapPref.SetSnapId( snap ); iChooseIapPref.SetIapId( 0 ); + if ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeImplicit ) + { + // No Connection selection dialog on reselection. + iChooseIapPref.SetConnType( TMpmConnPref::EConnTypeExplicit ); + } } else if ( iap ) { @@ -129,6 +134,11 @@ iap ) iChooseIapPref.SetIapId( iap ); iChooseIapPref.SetSnapId( 0 ); + if ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeImplicit ) + { + // No Connection selection dialog on reselection. + iChooseIapPref.SetConnType( TMpmConnPref::EConnTypeExplicit ); + } } MPMLOGSTRING3( "CMPMIapSelection::ChooseIapL: IapID: %i SnapId: %i", @@ -343,7 +353,8 @@ // KErrGprsOfflineMode should be returned instead of KErrNone. // - if ( !iapTypeLanOrWlan && iSession->MyServer().IsPhoneOffline() ) + if ( !iapTypeLanOrWlan && ( iSession->MyServer().IsPhoneOffline() || + iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown ) ) { ChooseIapComplete( KErrGprsOfflineMode, &iChooseIapPref ); } @@ -514,7 +525,8 @@ { ChooseIapComplete( KErrGprsServicesNotAllowed, NULL ); } - else if ( !iapTypeLanOrWlan && iSession->MyServer().IsPhoneOffline() ) + else if ( !iapTypeLanOrWlan && ( iSession->MyServer().IsPhoneOffline() || + iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown ) ) { // In case offline mode is enabled, only LAN or WLAN is allowed. // If some other bearer has been requested, then error code @@ -968,7 +980,8 @@ iapTypeLanOrWlan, *iSession ); - if ( !iapTypeLanOrWlan && iSession->MyServer().IsPhoneOffline() ) + if ( !iapTypeLanOrWlan && ( iSession->MyServer().IsPhoneOffline() || + iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMRoamingStatusUnknown ) ) { MPMLOGSTRING2( "CMPMIapSelection::CompleteImplicitConnectionL: Completing with code = %i", KErrGprsOfflineMode ) diff -r 22c3c67e5001 -r c45d4fe2ff0a cmmanager/cmmgr/Framework/Inc/cmdlg.h --- a/cmmanager/cmmgr/Framework/Inc/cmdlg.h Tue Apr 27 17:03:25 2010 +0300 +++ b/cmmanager/cmmgr/Framework/Inc/cmdlg.h Tue May 11 16:35:05 2010 +0300 @@ -226,6 +226,11 @@ */ TInt GetInsertIndexL( TInt aCount, TUint32 aPriority ); + /** + * Check if plugin exits exceptionally + */ + TBool IsExceptionExitL(); + protected: CCmListboxModel* iModel; TUint32 iHighlight; @@ -264,6 +269,11 @@ TBool iBackduringProcessing; CDestDlg* iDestDlg; + /** + * Indicate if exiting from plugin normally or exceptionally + */ + TBool iPluginExitExceptionally; + protected: // This is nescessary becaue in case of not supported CMs the data base // and the lisbox content is different.(The listbox doesn' show the diff -r 22c3c67e5001 -r c45d4fe2ff0a cmmanager/cmmgr/Framework/Src/cmdestinationimpl.cpp --- a/cmmanager/cmmgr/Framework/Src/cmdestinationimpl.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/cmmanager/cmmgr/Framework/Src/cmdestinationimpl.cpp Tue May 11 16:35:05 2010 +0300 @@ -1065,12 +1065,11 @@ CleanupStack::PushL( connMethod );// 2 connMethod->IncrementRefCounter(); item->iPlugin = connMethod; - - CleanupStack::PushL( item->iPlugin ); // 3 + // create the new record item->iDNRecord = iCmMgr.SNAPRecordL( 0 ); - CleanupStack::PushL( item->iDNRecord ); // 4 + CleanupStack::PushL( item->iDNRecord ); // 3 // if the destination is protection level 1, the connection method must be protected if ( ProtectionLevel() == EProtLevel1 ) @@ -1081,7 +1080,7 @@ TInt index = AddToArrayL( item ); index = index - KCmInitIndex; //the array contains one initial item, so subtract KCmInitIndex from the index to get cm index! - CleanupStack::Pop( 4, item ); // item, connMethod, iDNRecord, iPlugin + CleanupStack::Pop( 3, item ); // item, connMethod, iDNRecord return index; } diff -r 22c3c67e5001 -r c45d4fe2ff0a cmmanager/cmmgr/Framework/Src/cmdlg.cpp --- a/cmmanager/cmmgr/Framework/Src/cmdlg.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/cmmanager/cmmgr/Framework/Src/cmdlg.cpp Tue May 11 16:35:05 2010 +0300 @@ -112,6 +112,7 @@ , iExitduringProcessing( EFalse ) , iBackduringProcessing( EFalse ) , iDestDlg( aDestDlg ) + , iPluginExitExceptionally( EFalse ) { } @@ -136,7 +137,7 @@ // set old text back, if we have it... if ( iOldTitleText ) { - if ( iExitReason == KDialogUserBack ) + if ( iExitReason == KDialogUserBack || iPluginExitExceptionally ) { TRAP_IGNORE( iTitlePane->SetTextL( *iOldTitleText ) ); } @@ -482,6 +483,11 @@ { retVal = ETrue; } + + if ( iPluginExitExceptionally ) + { + retVal = ETrue; + } } break; } @@ -1141,11 +1147,6 @@ CleanupStack::PopAndDestroy( dest ); HandleListboxDataChangeL(); } - else - { - CleanupStack::PopAndDestroy( &destArray ); - User::Leave( KErrCancel ); - } CleanupStack::PopAndDestroy( &destArray ); } @@ -1226,6 +1227,7 @@ iCmDestinationImpl->UpdateL(); HandleListboxDataChangeL(); + iListbox->HandleItemRemovalL(); } CleanupStack::PopAndDestroy( &destArray ); @@ -1275,7 +1277,15 @@ TInt ret = cm->RunSettingsL(); if ( ret == KDialogUserExit ) { - TryExitL( KDialogUserExit ); + if( IsExceptionExitL() ) + { + iPluginExitExceptionally = ETrue; + TryExitL( KDialogUserBack ); + } + else + { + TryExitL( KDialogUserExit ); + } } else { @@ -1675,7 +1685,6 @@ if ( selected >= 0 ) { iListbox->ScrollToMakeItemVisible( selected); - iListbox->SetCurrentItemIndexAndDraw( selected ); } } } @@ -2003,3 +2012,24 @@ // Update list box HandleListboxDataChangeL(); } + +// -------------------------------------------------------------------------- +// CCmDlg::IsExceptionExitL +// -------------------------------------------------------------------------- +// +TBool CCmDlg::IsExceptionExitL() + { + TBool retV( EFalse ); + + if (iCmDestinationImpl) + { + // If the destination that is currently working on disappears + // with some reason then go back to parent view + if( !iCmManager->DestinationStillExistedL( iCmDestinationImpl ) ) + { + retV = ETrue; + } + } + + return retV; + } diff -r 22c3c67e5001 -r c45d4fe2ff0a cmmanager/cmmgr/Framework/Src/cmpbasesettingsdlg.cpp --- a/cmmanager/cmmgr/Framework/Src/cmpbasesettingsdlg.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/cmmanager/cmmgr/Framework/Src/cmpbasesettingsdlg.cpp Tue May 11 16:35:05 2010 +0300 @@ -553,10 +553,10 @@ { if ( iIsPossibleToSaveSetting && iHasSettingChanged ) - { + { iCmPluginBaseEng.UpdateL(); iHasSettingChanged = EFalse; - } + } retval = ETrue; break; } diff -r 22c3c67e5001 -r c45d4fe2ff0a cmmanager/cmmgr/Framework/Src/uncatdlg.cpp --- a/cmmanager/cmmgr/Framework/Src/uncatdlg.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/cmmanager/cmmgr/Framework/Src/uncatdlg.cpp Tue May 11 16:35:05 2010 +0300 @@ -291,6 +291,7 @@ case KErrNone: { HandleListboxDataChangeL(); + iListbox->HandleItemRemovalL(); if ( !iListbox->Model()->NumberOfItems() ) { diff -r 22c3c67e5001 -r c45d4fe2ff0a cmmanager/cmmgr/Plugins/cmpluginpacketdata/inc/cmppacketdatasettingsdlg.h --- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/inc/cmppacketdatasettingsdlg.h Tue Apr 27 17:03:25 2010 +0300 +++ b/cmmanager/cmmgr/Plugins/cmpluginpacketdata/inc/cmppacketdatasettingsdlg.h Tue May 11 16:35:05 2010 +0300 @@ -83,7 +83,7 @@ * * @since S60 3.2 */ - virtual void RunAdvancedSettingsL(); + virtual void RunAdvancedSettingsL(); public: // from class MCmCommsDatWatcher diff -r 22c3c67e5001 -r c45d4fe2ff0a cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmppacketdatasettingsdlg.cpp --- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmppacketdatasettingsdlg.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmppacketdatasettingsdlg.cpp Tue May 11 16:35:05 2010 +0300 @@ -96,6 +96,9 @@ TInt CmPluginPacketDataSettingsDlg::ConstructAndRunLD( ) { + // Set this flag to allow edit continue + iCanEditingContinue = ETrue; + CleanupStack::PushL( this ); LoadResourceL( KPluginPacketDataResDirAndFileName ); CleanupStack::Pop( this ); @@ -290,6 +293,13 @@ { LOGGER_ENTERFN( "CmPluginPacketDataSettingsDlg::ProcessCommandL" ); + if ( !iCanEditingContinue ) + { + // We have to block all editing activity if database changed by + // other application + return; + } + if ( MenuShowing() ) { HideMenu(); @@ -323,6 +333,29 @@ // TBool CmPluginPacketDataSettingsDlg::OkToExitL( TInt aButtonId ) { + // Database has been changed by other application so exit from this view + // without update editings to database + if ( !iCanEditingContinue ) + { + if ( iExitReason == KDialogUserExit ) + { + iCmPluginBaseEng.CmMgr().WatcherUnRegister(); + + // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call + TInt exitValue = KDialogUserExit; + iExitReason = KDialogUserBack; + // If destination has been deleted by other application + // then we may have to exit from Cmmgr + TryExitL( exitValue ); + return EFalse; + } + else + { + // Exit from this view here to avoid possible update to databse + return ETrue; + } + } + TBool retval( EFalse ); switch ( aButtonId ) @@ -362,6 +395,11 @@ // void CmPluginPacketDataSettingsDlg::CommsDatChangesL() { + if ( !iCanEditingContinue ) + { + return; + } + CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination(); @@ -369,53 +407,24 @@ { if( !cmMgr.DestinationStillExistedL( parentDest ) ) { - cmMgr.WatcherUnRegister(); - // If parent destination diappears with some reason - // then the view must exit back to main view for it - // may be danger if going back to parent view iExitReason = KDialogUserExit; - TryExitL( iExitReason ); + iCanEditingContinue = EFalse; cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; return; } - if( !cmMgr.IsIapStillInDestL( parentDest, iCmPluginBaseEng ) ) - { - cmMgr.WatcherUnRegister(); - // In this case, the view can go back to the parent view - TryExitL( iExitReason ); - - cmMgr.RemoveDestFromPool( parentDest ); - delete parentDest; - return; - } - - // We may have to go back to parent view even though this Iap is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); - + // We may have to go back to parent view if database is changed by other application + iCanEditingContinue = EFalse; + cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; } - else + else // Legacy { - if( !cmMgr.IapStillExistedL( iCmPluginBaseEng ) ) - { - cmMgr.WatcherUnRegister(); - // In this case, the dialog can go back to the parent view - TryExitL( iExitReason ); - return; - } - - // We may have to go back to parent view even though this Iap is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); + // We may have to go back to parent view if database is changed by other application + iCanEditingContinue = EFalse; } } @@ -433,7 +442,13 @@ // -------------------------------------------------------------------------- // void CmPluginPacketDataSettingsDlg::HandleCommsDatChangeL() - { + { + if ( iCanEditingContinue ) + { + // Set iCanEditingContinue to False so that exit fromn this view without update editings + iCanEditingContinue = EFalse; + } + if( iNotifyFromSon == KCmNotifiedIapIsNotInThisDestination || iNotifyFromSon == KCmNotifiedIapDisappear ) { diff -r 22c3c67e5001 -r c45d4fe2ff0a cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmppacketdatasettingsdlgadv.cpp --- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmppacketdatasettingsdlgadv.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmppacketdatasettingsdlgadv.cpp Tue May 11 16:35:05 2010 +0300 @@ -96,6 +96,9 @@ // TInt CmPluginPacketDataSettingsDlgAdv::ConstructAndRunLD() { + // Set this flag to allow edit continue + iCanEditingContinue = ETrue; + CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); cmMgr.WatcherRegisterL( this ); @@ -313,11 +316,18 @@ // void CmPluginPacketDataSettingsDlgAdv::ProcessCommandL( TInt aCommandId ) { + if ( !iCanEditingContinue ) + { + // We have to block all editing activity if database changed by + // other application + return; + } + if ( MenuShowing() ) { HideMenu(); } - + switch ( aCommandId ) { case EPluginBaseCmdExit: @@ -360,6 +370,29 @@ // TBool CmPluginPacketDataSettingsDlgAdv::OkToExitL( TInt aButtonId ) { + // Database has been changed by other application so exit from this view + // without update editings to database + if ( !iCanEditingContinue ) + { + if ( iExitReason == KDialogUserExit ) + { + iCmPluginBaseEng.CmMgr().WatcherUnRegister(); + + // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call + TInt exitValue = KDialogUserExit; + iExitReason = KDialogUserBack; + // If destination has been deleted by other application + // then we may have to exit from Cmmgr + TryExitL( exitValue ); + return EFalse; + } + else + { + // Exit from this view here to avoid possible update to databse + return ETrue; + } + } + TBool retval( EFalse ); switch ( aButtonId ) { @@ -368,7 +401,11 @@ { CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); cmMgr.WatcherUnRegister(); + + iExitReason = KDialogUserBack; + retval = ETrue; } + break; default: { retval = CmPluginBaseSettingsDlgAdv::OkToExitL( aButtonId ); @@ -414,6 +451,11 @@ // void CmPluginPacketDataSettingsDlgAdv::CommsDatChangesL() { + if ( !iCanEditingContinue ) + { + return; + } + CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination(); @@ -426,68 +468,31 @@ iParent->NotifyParentView( KCmNotifiedDestinationDisappear ); } - cmMgr.WatcherUnRegister(); - // If parent destination is deleted by somebody then the dialog must exit back to main view + iCanEditingContinue = EFalse; iExitReason = KDialogUserExit; - TryExitL( iExitReason ); - - cmMgr.RemoveDestFromPool( parentDest ); - delete parentDest; - return; - } - - if( !cmMgr.IsIapStillInDestL( parentDest, iCmPluginBaseEng ) ) - { - if( iParent ) - { - iParent->NotifyParentView( KCmNotifiedIapIsNotInThisDestination ); - } - - cmMgr.WatcherUnRegister(); - // In this case, the dialog can go back to the parent view - TryExitL( iExitReason ); cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; return; } - - // We may have to notify parent view to go back to its parent view even though this Iap is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. + + // We may have to go back to parent view if database is changed by other application if( iParent ) { iParent->NotifyParentView( KCmNotifiedIapDisappear ); } - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); - + iCanEditingContinue = EFalse; + cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; } - else + else // Legacy { - if( !cmMgr.IapStillExistedL(iCmPluginBaseEng) ) - { - if( iParent ) - { - iParent->NotifyParentView( KCmNotifiedIapDisappear ); - } - - cmMgr.WatcherUnRegister(); - // In this case, the dialog can go back to the parent view - TryExitL( iExitReason ); - return; - } - - // We may have to notify parent view to go back to its parent view even though this Iap is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. + // We may have to go back to parent view if database is changed by other application if( iParent ) { iParent->NotifyParentView( KCmNotifiedIapDisappear ); } - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); + iCanEditingContinue = EFalse; } } diff -r 22c3c67e5001 -r c45d4fe2ff0a cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpvpnsettingsdlg.cpp --- a/cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpvpnsettingsdlg.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpvpnsettingsdlg.cpp Tue May 11 16:35:05 2010 +0300 @@ -77,6 +77,10 @@ TInt CmPluginVpnSettingsDlg::ConstructAndRunLD( ) { LOGGER_ENTERFN( "CmPluginVpnSettingsDlg::ConstructAndRunLD" ); + + // Set this flag to allow edit continue + iCanEditingContinue = ETrue; + CleanupStack::PushL( this ); LoadResourceL( KPluginVPNResDirAndFileName ); @@ -365,11 +369,18 @@ // void CmPluginVpnSettingsDlg::ProcessCommandL( TInt aCommandId ) { + if ( !iCanEditingContinue ) + { + // We have to block all editing activity if database changed by + // other application + return; + } + if ( MenuShowing() ) { HideMenu(); } - + switch ( aCommandId ) { case EAknSoftkeyOk: @@ -472,6 +483,29 @@ // TBool CmPluginVpnSettingsDlg::OkToExitL( TInt aButtonId ) { + // Database has been changed by other application so exit from this view + // without update editings to database + if ( !iCanEditingContinue ) + { + if ( iExitReason == KDialogUserExit ) + { + iCmPluginBaseEng.CmMgr().WatcherUnRegister(); + + // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call + TInt exitValue = KDialogUserExit; + iExitReason = KDialogUserBack; + // If destination has been deleted by other application + // then we may have to exit from Cmmgr + TryExitL( exitValue ); + return EFalse; + } + else + { + // Exit from this view here to avoid possible update to databse + return ETrue; + } + } + // Translate the button presses into commands for the appui & current // view to handle TBool retval( EFalse ); @@ -556,6 +590,11 @@ // void CmPluginVpnSettingsDlg::CommsDatChangesL() { + if ( !iCanEditingContinue ) + { + return; + } + CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination(); @@ -563,52 +602,26 @@ { if( !cmMgr.DestinationStillExistedL( parentDest ) ) { - cmMgr.WatcherUnRegister(); // If parent destination diappears with some reason // then the view must exit back to main view for it // may be danger if going back to parent view iExitReason = KDialogUserExit; - TryExitL( iExitReason ); - + iCanEditingContinue = EFalse; + cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; return; } - if( !cmMgr.IsIapStillInDestL( parentDest, iCmPluginBaseEng ) ) - { - cmMgr.WatcherUnRegister(); - // In this case, the view can go back to the parent view - TryExitL( iExitReason ); - - cmMgr.RemoveDestFromPool( parentDest ); - delete parentDest; - return; - } - - // We may have to go back to parent view even though this Iap is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); - + // We may have to go back to parent view if database is changed by other application + iCanEditingContinue = EFalse; + cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; } - else + else // Legacy { - if( !cmMgr.IapStillExistedL( iCmPluginBaseEng ) ) - { - cmMgr.WatcherUnRegister(); - // In this case, the dialog can go back to the parent view - TryExitL( iExitReason ); - return; - } - - // We may have to go back to parent view even though this Iap is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); + // We may have to go back to parent view if database is changed by other application + iCanEditingContinue = EFalse; } } diff -r 22c3c67e5001 -r c45d4fe2ff0a cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlg.cpp --- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlg.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlg.cpp Tue May 11 16:35:05 2010 +0300 @@ -118,7 +118,12 @@ // TInt CmPluginWlanSettingsDlg::ConstructAndRunLD( ) { + // Set this flag to allow edit continue + iCanEditingContinue = ETrue; + + CleanupStack::PushL( this ); LoadResourceL( KPluginWlanResDirAndFileName ); + CleanupStack::Pop( this ); CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); cmMgr.WatcherRegisterL( this ); @@ -769,6 +774,29 @@ // TBool CmPluginWlanSettingsDlg::OkToExitL( TInt aButtonId ) { + // Database has been changed by other application so exit from this view + // without update editings to database + if ( !iCanEditingContinue ) + { + if ( iExitReason == KDialogUserExit ) + { + iCmPluginBaseEng.CmMgr().WatcherUnRegister(); + + // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call + TInt exitValue = KDialogUserExit; + iExitReason = KDialogUserBack; + // If destination has been deleted by other application + // then we may have to exit from Cmmgr + TryExitL( exitValue ); + return EFalse; + } + else + { + // Exit from this view here to avoid possible update to databse + return ETrue; + } + } + // Translate the button presses into commands for the appui & current // view to handle TBool retval( EFalse ); @@ -817,11 +845,18 @@ // void CmPluginWlanSettingsDlg::ProcessCommandL( TInt aCommandId ) { + if ( !iCanEditingContinue ) + { + // We have to block all editing activity if database changed by + // other application + return; + } + if ( MenuShowing() ) { HideMenu(); } - + switch ( aCommandId ) { case EPluginBaseCmdExit: @@ -873,6 +908,11 @@ // void CmPluginWlanSettingsDlg::CommsDatChangesL() { + if ( !iCanEditingContinue ) + { + return; + } + CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination(); @@ -880,51 +920,25 @@ { if( !cmMgr.DestinationStillExistedL( parentDest ) ) { - cmMgr.WatcherUnRegister(); // If parent destination is deleted by somebody then the dialog must exit back to main view iExitReason = KDialogUserExit; - TryExitL( iExitReason ); - + iCanEditingContinue = EFalse; + cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; return; } - if( !cmMgr.IsIapStillInDestL( parentDest, iCmPluginBaseEng ) ) - { - cmMgr.WatcherUnRegister(); - // In this case, the dialog can go back to the parent view - TryExitL( iExitReason ); - - cmMgr.RemoveDestFromPool( parentDest ); - delete parentDest; - return; - } + // We may have to go back to parent view if database is changed by other application + iCanEditingContinue = EFalse; - // We may have to go back to parent view even though this Iap is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); - cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; } - else + else // Legacy { - if( !cmMgr.IapStillExistedL( iCmPluginBaseEng ) ) - { - cmMgr.WatcherUnRegister(); - // In this case, the dialog can go back to the parent view - TryExitL( iExitReason ); - return; - } - - // We may have to go back to parent view even though this Iap is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); + // We may have to go back to parent view if database is changed by other application + iCanEditingContinue = EFalse; } } @@ -943,7 +957,11 @@ // void CmPluginWlanSettingsDlg::HandleCommsDatChangeL() { - //CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); + if ( iCanEditingContinue ) + { + // Set iCanEditingContinue to False so that exit fromn this view without update editings + iCanEditingContinue = EFalse; + } if( iNotifyFromAdv == KCmNotifiedIapIsNotInThisDestination || iNotifyFromAdv == KCmNotifiedIapDisappear ) diff -r 22c3c67e5001 -r c45d4fe2ff0a cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgadv.cpp --- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgadv.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgadv.cpp Tue May 11 16:35:05 2010 +0300 @@ -69,6 +69,9 @@ // TInt CmPluginWlanSettingsDlgAdv::ConstructAndRunLD( ) { + // Set this flag to allow edit continue + iCanEditingContinue = ETrue; + CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); cmMgr.WatcherRegisterL( this ); @@ -398,11 +401,18 @@ // void CmPluginWlanSettingsDlgAdv:: ProcessCommandL( TInt aCommandId ) { + if ( !iCanEditingContinue ) + { + // We have to block all editing activity if database changed by + // other application + return; + } + if ( MenuShowing() ) { HideMenu(); } - + switch ( aCommandId ) { case EPluginBaseCmdExit: @@ -474,6 +484,29 @@ // TBool CmPluginWlanSettingsDlgAdv::OkToExitL( TInt aButtonId ) { + // Database has been changed by other application so exit from this view + // without update editings to database + if ( !iCanEditingContinue ) + { + if ( iExitReason == KDialogUserExit ) + { + iCmPluginBaseEng.CmMgr().WatcherUnRegister(); + + // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call + TInt exitValue = KDialogUserExit; + iExitReason = KDialogUserBack; + // If destination has been deleted by other application + // then we may have to exit from Cmmgr + TryExitL( exitValue ); + return EFalse; + } + else + { + // Exit from this view here to avoid possible update to databse + return ETrue; + } + } + // Translate the button presses into commands for the appui & current // view to handle TBool retval( EFalse ); @@ -521,6 +554,11 @@ // void CmPluginWlanSettingsDlgAdv::CommsDatChangesL() { + if ( !iCanEditingContinue ) + { + return; + } + CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination(); @@ -533,69 +571,33 @@ iParent->NotifyParentView( KCmNotifiedDestinationDisappear ); } - cmMgr.WatcherUnRegister(); // If parent destination is deleted by somebody then the dialog must exit back to main view iExitReason = KDialogUserExit; - TryExitL( iExitReason ); - + iCanEditingContinue = EFalse; + cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; return; } - if( !cmMgr.IsIapStillInDestL( parentDest, iCmPluginBaseEng ) ) - { - if( iParent ) - { - iParent->NotifyParentView( KCmNotifiedIapIsNotInThisDestination ); - } - - cmMgr.WatcherUnRegister(); - // In this case, the dialog can go back to the parent view - TryExitL( iExitReason ); - - cmMgr.RemoveDestFromPool( parentDest ); - delete parentDest; - return; - } - - // We may have to notify parent view to go back to its parent view even though this is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. + // We may have to go back to parent view if database is changed by other application if( iParent ) { iParent->NotifyParentView( KCmNotifiedIapDisappear ); } - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); - + iCanEditingContinue = EFalse; + cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; } - else + else // Legacy { - if( !cmMgr.IapStillExistedL( iCmPluginBaseEng ) ) - { - if( iParent ) - { - iParent->NotifyParentView( KCmNotifiedIapDisappear ); - } - - cmMgr.WatcherUnRegister(); - // In this case, the dialog can go back to the parent view - TryExitL( iExitReason ); - return; - } - - // We may have to notify parent view to go back to its parent view even though this is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. + // We may have to go back to parent view if database is changed by other application if( iParent ) { iParent->NotifyParentView( KCmNotifiedIapDisappear ); } - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); + iCanEditingContinue = EFalse; } } @@ -618,7 +620,13 @@ // -------------------------------------------------------------------------- // void CmPluginWlanSettingsDlgAdv::HandleCommsDatChangeL() - { + { + if ( iCanEditingContinue ) + { + // Set iCanEditingContinue to False so that exit fromn this view without update editings + iCanEditingContinue = EFalse; + } + if( iNotifyFromIp == KCmNotifiedIapIsNotInThisDestination || iNotifyFromIp == KCmNotifiedIapDisappear ) { diff -r 22c3c67e5001 -r c45d4fe2ff0a cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgipv4.cpp --- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgipv4.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgipv4.cpp Tue May 11 16:35:05 2010 +0300 @@ -69,6 +69,9 @@ // TInt CmPluginWlanSettingsDlgIpv4::ConstructAndRunLD() { + // Set this flag to allow edit continue + iCanEditingContinue = ETrue; + CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); cmMgr.WatcherRegisterL( this ); @@ -157,10 +160,18 @@ // void CmPluginWlanSettingsDlgIpv4::ProcessCommandL( TInt aCommandId ) { + if ( !iCanEditingContinue ) + { + // We have to block all editing activity if database changed by + // other application + return; + } + if ( MenuShowing() ) { HideMenu(); } + switch ( aCommandId ) { case EPluginBaseCmdExit: @@ -196,6 +207,29 @@ // TBool CmPluginWlanSettingsDlgIpv4::OkToExitL( TInt aButtonId ) { + // Database has been changed by other application so exit from this view + // without update editings to database + if ( !iCanEditingContinue ) + { + if ( iExitReason == KDialogUserExit ) + { + iCmPluginBaseEng.CmMgr().WatcherUnRegister(); + + // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call + TInt exitValue = KDialogUserExit; + iExitReason = KDialogUserBack; + // If destination has been deleted by other application + // then we may have to exit from Cmmgr + TryExitL( exitValue ); + return EFalse; + } + else + { + // Exit from this view here to avoid possible update to databse + return ETrue; + } + } + TBool retval( EFalse ); switch ( aButtonId ) @@ -315,6 +349,11 @@ // void CmPluginWlanSettingsDlgIpv4::CommsDatChangesL() { + if ( !iCanEditingContinue ) + { + return; + } + CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination(); @@ -327,68 +366,32 @@ iParent->NotifyParentView( KCmNotifiedDestinationDisappear ); } - cmMgr.WatcherUnRegister(); // If parent destination is deleted by somebody then the dialog must exit back to main view iExitReason = KDialogUserExit; - TryExitL( iExitReason ); - - cmMgr.RemoveDestFromPool( parentDest ); - delete parentDest; - return; - } - - if( !cmMgr.IsIapStillInDestL( parentDest, iCmPluginBaseEng ) ) - { - if( iParent ) - { - iParent->NotifyParentView( KCmNotifiedIapIsNotInThisDestination ); - } - - cmMgr.WatcherUnRegister(); - // In this case, the dialog can go back to the parent view - TryExitL( iExitReason ); - + iCanEditingContinue = EFalse; + cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; return; } - // We may have to notify parent view to go back to its parent view even though this Iap is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. + // We may have to go back to parent view if database is changed by other application if( iParent ) { iParent->NotifyParentView( KCmNotifiedIapDisappear ); } - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); - + iCanEditingContinue = EFalse; + cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; } - else + else // Legacy { - if( !cmMgr.IapStillExistedL( iCmPluginBaseEng ) ) - { - if( iParent ) - { - iParent->NotifyParentView( KCmNotifiedIapDisappear ); - } - - cmMgr.WatcherUnRegister(); - // In this case, the dialog can go back to the parent view - TryExitL( iExitReason ); - return; - } - - // We may have to notify parent view to go back to its parent view even though this Iap is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. + // We may have to go back to parent view if database is changed by other application if( iParent ) { iParent->NotifyParentView( KCmNotifiedIapDisappear ); } - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); + iCanEditingContinue = EFalse; } } diff -r 22c3c67e5001 -r c45d4fe2ff0a cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgipv6.cpp --- a/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgipv6.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/cmmanager/cmmgr/Plugins/cmpluginwlan/src/cmpwlansettingsdlgipv6.cpp Tue May 11 16:35:05 2010 +0300 @@ -84,6 +84,9 @@ // TInt CmPluginWlanSettingsDlgIpv6::ConstructAndRunLD() { + // Set this flag to allow edit continue + iCanEditingContinue = ETrue; + CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); cmMgr.WatcherRegisterL( this ); @@ -190,11 +193,18 @@ // void CmPluginWlanSettingsDlgIpv6:: ProcessCommandL( TInt aCommandId ) { + if ( !iCanEditingContinue ) + { + // We have to block all editing activity if database changed by + // other application + return; + } + if ( MenuShowing() ) { HideMenu(); } - + switch ( aCommandId ) { case EPluginBaseCmdExit: @@ -231,6 +241,29 @@ // TBool CmPluginWlanSettingsDlgIpv6::OkToExitL( TInt aButtonId ) { + // Database has been changed by other application so exit from this view + // without update editings to database + if ( !iCanEditingContinue ) + { + if ( iExitReason == KDialogUserExit ) + { + iCmPluginBaseEng.CmMgr().WatcherUnRegister(); + + // Set iExitReason back to KDialogUserBack so as to exit from this view through else in the next call + TInt exitValue = KDialogUserExit; + iExitReason = KDialogUserBack; + // If destination has been deleted by other application + // then we may have to exit from Cmmgr + TryExitL( exitValue ); + return EFalse; + } + else + { + // Exit from this view here to avoid possible update to databse + return ETrue; + } + } + TBool retval( EFalse ); switch ( aButtonId ) @@ -241,7 +274,11 @@ { CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); cmMgr.WatcherUnRegister(); - } // Continue to call base setting dialog view + + iExitReason = KDialogUserBack; + retval = ETrue; + } + break; default: { retval = CmPluginBaseSettingsDlgIp::OkToExitL( aButtonId ); @@ -266,6 +303,11 @@ // void CmPluginWlanSettingsDlgIpv6::CommsDatChangesL() { + if ( !iCanEditingContinue ) + { + return; + } + CCmManagerImpl& cmMgr = iCmPluginBaseEng.CmMgr(); CCmDestinationImpl* parentDest = iCmPluginBaseEng.ParentDestination(); @@ -278,68 +320,32 @@ iParent->NotifyParentView( KCmNotifiedDestinationDisappear ); } - // cmMgr.WatcherUnRegister(); // If parent destination is deleted by somebody then the dialog must exit back to main view - iExitReason = KDialogUserExit; // cmMgr.WatcherUnRegister will be done in function OkToExitL in this case - TryExitL( iExitReason ); - + iExitReason = KDialogUserExit; + iCanEditingContinue = EFalse; + cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; return; } - - if( !cmMgr.IsIapStillInDestL( parentDest, iCmPluginBaseEng ) ) - { - if( iParent ) - { - iParent->NotifyParentView( KCmNotifiedIapIsNotInThisDestination ); - } - - cmMgr.WatcherUnRegister(); - // In this case, the dialog can go back to the parent view - TryExitL( iExitReason ); - - cmMgr.RemoveDestFromPool( parentDest ); - delete parentDest; - return; - } - - // We may have to notify parent view to go back to its parent view even though this Iap is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. + + // We may have to go back to parent view if database is changed by other application if( iParent ) { iParent->NotifyParentView( KCmNotifiedIapDisappear ); } - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); - + iCanEditingContinue = EFalse; + cmMgr.RemoveDestFromPool( parentDest ); delete parentDest; } else { - if( !cmMgr.IapStillExistedL( iCmPluginBaseEng ) ) - { - if( iParent ) - { - iParent->NotifyParentView( KCmNotifiedIapDisappear ); - } - - cmMgr.WatcherUnRegister(); - // In this case, the dialog can go back to the parent view - TryExitL( iExitReason ); - return; - } - - // We may have to notify parent view to go back to its parent view even though this Iap is still in CommsDat - // for cmMgr ( = iCmPluginBaseEng.CmMgr() ) can not be accessed any more - // after this call when some Iap is deleted. + // We may have to go back to parent view if database is changed by other application if( iParent ) { iParent->NotifyParentView( KCmNotifiedIapDisappear ); } - cmMgr.WatcherUnRegister(); - TryExitL( iExitReason ); + iCanEditingContinue = EFalse; } } diff -r 22c3c67e5001 -r c45d4fe2ff0a connectionmonitoring/connmon/connectionmonitor/src/ConnMonBearerGPRS.cpp --- a/connectionmonitoring/connmon/connectionmonitor/src/ConnMonBearerGPRS.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/src/ConnMonBearerGPRS.cpp Tue May 11 16:35:05 2010 +0300 @@ -60,13 +60,14 @@ { switch ( mode ) { - case RMobilePhone::ENetworkModeGsm: - case RMobilePhone::ENetworkModeUnknown: // Emulator default + case RMobilePhone::ENetworkModeGsm: err = iConnMonIAP->GetBearerSupportInfo( EBearerIdGPRS, byCell, byPhone ); break; case RMobilePhone::ENetworkModeWcdma: err = iConnMonIAP->GetBearerSupportInfo( EBearerIdWCDMA, byCell, byPhone ); break; + case RMobilePhone::ENetworkModeUnknown: // Emulator default + break; default: LOGEXITFN1("TConnMonBearerGPRS::GetAvailability()", err) return err; // Return silently, report not available diff -r 22c3c67e5001 -r c45d4fe2ff0a connectionutilities/ConnectionDialogs/ConnectionUiUtilities/data/ConnUiUtilsNotif.rss --- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/data/ConnUiUtilsNotif.rss Tue Apr 27 17:03:25 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/data/ConnUiUtilsNotif.rss Tue May 11 16:35:05 2010 +0300 @@ -83,32 +83,30 @@ } RESOURCE DIALOG r_easy_wep_wpa_dlg - { + { flags = EEikDialogFlagNotifyEsc | EEikDialogFlagCbaButtons | - EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | - EEikDialogFlagVirtualInput; - buttons=R_AVKON_SOFTKEYS_OK_CANCEL__OK; + EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar; + buttons=R_AVKON_SOFTKEYS_OK_CANCEL__OK; items= - { - DLG_LINE - { - type=EAknCtQuery; - id=EGeneralQuery; - control= AVKON_DATA_QUERY - { - layout=EDataLayout; + { + DLG_LINE + { + type=EAknCtQuery; + id=EGeneralQuery; + control= AVKON_DATA_QUERY + { + layout=EDataLayout; control = EDWIN { avkon_flags = EAknEditorFlagLatinInputModesOnly; default_case = EAknEditorLowerCase; - default_input_mode = EAknEditorTextInputMode; + default_input_mode = EAknEditorTextInputMode; allowed_input_modes = EAknEditorAllInputModes; }; - }; - } - }; - - } + }; + } + }; + } RESOURCE TBUF r_info_no_networks_found { diff -r 22c3c67e5001 -r c45d4fe2ff0a connectionutilities/ConnectionDialogs/DisconnectDlg/inc/ConnectionModel.h --- a/connectionutilities/ConnectionDialogs/DisconnectDlg/inc/ConnectionModel.h Tue Apr 27 17:03:25 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/DisconnectDlg/inc/ConnectionModel.h Tue May 11 16:35:05 2010 +0300 @@ -75,13 +75,6 @@ */ void InitConnectionArrayL(); - /** - * It is called when RConnectionMonitor has sent its event after ending - * connection - * @return - - */ - void SelectedConnectionClosedL(); - public: diff -r 22c3c67e5001 -r c45d4fe2ff0a connectionutilities/ConnectionDialogs/DisconnectDlg/src/ConnectionModel.cpp --- a/connectionutilities/ConnectionDialogs/DisconnectDlg/src/ConnectionModel.cpp Tue Apr 27 17:03:25 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/DisconnectDlg/src/ConnectionModel.cpp Tue May 11 16:35:05 2010 +0300 @@ -308,8 +308,12 @@ { // notifier will finish, so cancel all other notifications iMonitor.CancelNotifications(); - SelectedConnectionClosedL(); - + + // Bring back the 3s delay to avoid possible problems. + // (GPRS Detach and Attach overlapping, when only 1 context allowed, + // causing 15s delay.) + User::After( CAknNoteDialog::ELongTimeout ); + iDisconnectDialogUi->CompleteL( KErrNone ); } else if( iDisconnectDialogUi && @@ -348,21 +352,6 @@ // --------------------------------------------------------- -// CConnectionModel::SelectedConnectionClosedL -// --------------------------------------------------------- -// -void CConnectionModel::SelectedConnectionClosedL() - { - CLOG_ENTERFN("CConnectionModel::SelectedConnectionClosedL"); - - // the connection is succesfully closed - CConnectionInfo* info = iConnArray->At( iClosingConnectionIndex ); - - CLOG_LEAVEFN("CConnectionModel::SelectedConnectionClosedL"); - } - - -// --------------------------------------------------------- // CDisconnectDlgDialog::InfoNoteL // --------------------------------------------------------- // diff -r 22c3c67e5001 -r c45d4fe2ff0a ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlg.h --- a/ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlg.h Tue Apr 27 17:03:25 2010 +0300 +++ b/ipcm_plat/bearer_settings_plugin_api/inc/cmpbasesettingsdlg.h Tue May 11 16:35:05 2010 +0300 @@ -399,6 +399,10 @@ // A flag to indicate if setting has been changed by user TBool iHasSettingChanged; + // A flag to indicate if edited IAP can be continued + // IAP may be possible to be modified or deleted by other application + TBool iCanEditingContinue; + }; #endif // CMPLUGINBASE_SETTINGS_DLG_H