# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1277125589 -10800 # Node ID 4c83dcfb6f1acbce6f60244635be4638307de3b6 # Parent 04408506c6e089744b2c1a6e59d83c958790c998 Revision: 201023 Kit: 2010125 diff -r 04408506c6e0 -r 4c83dcfb6f1a bearermanagement/S60MCPR/inc/s60mcpractivities.h --- a/bearermanagement/S60MCPR/inc/s60mcpractivities.h Wed Jun 09 10:07:12 2010 +0300 +++ b/bearermanagement/S60MCPR/inc/s60mcpractivities.h Mon Jun 21 16:06:29 2010 +0300 @@ -24,7 +24,7 @@ #define S60MCPR_ACTIVITIES_H #include - +#include #include "s60mcprstates.h" // Forward declarations @@ -50,13 +50,24 @@ * S60 MCPR's connection selection activity related * states, transitions and forks. * - * The activity doesn't need activity class because it - * reuses the Symbian's core implementation for - * selection. - * */ namespace S60MCprSelectActivity { + + class CS60SelectActivity : public MCprActivities::CSelectNextLayerActivity + { + public: // Methods + static MeshMachine::CNodeActivityBase* NewL(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode); + + // Overrides CNodeActivityBase's implementation + virtual void Cancel(MeshMachine::TNodeContextBase& aContext); + + private: // Methods + + // C++ constructor + CS60SelectActivity(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode); + }; + /** * Execution context definition for meshmachine activities. */ @@ -109,11 +120,6 @@ * S60MCprSimpleSelectActivity namespace packages the * S60 MCPR's connection selection activity related * states, transitions and forks. - * - * The activity doesn't need activity class because it - * reuses the Symbian's core implementation for - * selection. - * */ namespace S60MCprSimpleSelectActivity { diff -r 04408506c6e0 -r 4c83dcfb6f1a bearermanagement/S60MCPR/src/s60mcpractivities.cpp --- a/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Wed Jun 09 10:07:12 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcpractivities.cpp Mon Jun 21 16:06:29 2010 +0300 @@ -38,7 +38,7 @@ DECLARE_DEFINE_CUSTOM_NODEACTIVITY( ECFActivitySelect, S60MCprSelect, TCFSelector::TSelect, - CSelectNextLayerActivity::NewL ) + CS60SelectActivity::NewL ) // Reply from TAwaitingSelectNextLayer if no choices, otherwise accept FIRST_NODEACTIVITY_ENTRY( TAwaitingSelectNextLayer, @@ -117,7 +117,7 @@ DECLARE_DEFINE_CUSTOM_NODEACTIVITY( ECFActivitySelect, MCprSimpleSelect, TCFSelector::TSimpleSelect, - CSelectNextLayerActivity::NewL ) + S60MCprSelectActivity::CS60SelectActivity::NewL ) // Reply from TAwaitingSelectNextLayer if no choices, otherwise accept FIRST_NODEACTIVITY_ENTRY( S60MCprSimpleSelectActivity::TAwaitingSelectNextLayer, S60MCprSimpleSelectActivity::TChooseBestIAPRequiredOrNoTagOrSetChosenApActive ) diff -r 04408506c6e0 -r 4c83dcfb6f1a bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp --- a/bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp Wed Jun 09 10:07:12 2010 +0300 +++ b/bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp Mon Jun 21 16:06:29 2010 +0300 @@ -42,6 +42,36 @@ // namespace S60MCprSelectActivity { + // Overrides CNodeActivityBase method implementation + void CS60SelectActivity::Cancel(MeshMachine::TNodeContextBase& aContext) + { + S60MCPRLOGSTRING1("S60MCPR<%x>::CS60SelectActivity::Cancel()",(TInt*)&aContext.Node()) + __ASSERT_DEBUG(aContext.iNodeActivity, User::Panic(KS60MCprPanic, KPanicNoActivity)); + CSelectNextLayerActivity& ac = + static_cast( *aContext.iNodeActivity ); + + if (!ac.iTierManager.IsNull() && ac.iTierManager == PostedToNodeId()) + { + S60MCPRLOGSTRING1("S60MCPR<%x>::CS60SelectActivity::Cancel() Forwarding TCancel to TM",(TInt*)&aContext.Node()) + RClientInterface::OpenPostMessageClose(TNodeCtxId(ActivityId(), iNode.Id()), PostedToNodeId(), TEBase::TCancel().CRef()); + SetError( KErrCancel ); + } + else + { + CSelectNextLayerActivity::Cancel(aContext); + } + } + + MeshMachine::CNodeActivityBase* CS60SelectActivity::NewL(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode) + { + return new(ELeave) CS60SelectActivity( aActivitySig, aNode ); + } + + CS60SelectActivity::CS60SelectActivity(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode) + : CSelectNextLayerActivity(aActivitySig, aNode) + { + } + // ----------------------------------------------------------------------------- // TAwaitingSelectNextLayer // ----------------------------------------------------------------------------- @@ -170,8 +200,7 @@ CleanupStack::PushL(nextAP); node.ConnPrefList().AppendL(nextAP); CleanupStack::Pop(); - /* END OF HACK */ - + /* END OF HACK */ // Attach. 399 attach shouldn't be visible here. if ( prefs.Scope()&TSelectionPrefs::ESelectFromExisting ) { @@ -194,7 +223,7 @@ newPrefs.SetPrefs( ippprefs ); TCFSelector::TSimpleSelect msg(newPrefs); iContext.iNodeActivity->PostRequestTo(ac.iTierManager, msg); - } + } } } diff -r 04408506c6e0 -r 4c83dcfb6f1a bearermanagement/mpm/inc/mpmconnmonevents.h --- a/bearermanagement/mpm/inc/mpmconnmonevents.h Wed Jun 09 10:07:12 2010 +0300 +++ b/bearermanagement/mpm/inc/mpmconnmonevents.h Mon Jun 21 16:06:29 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" diff -r 04408506c6e0 -r 4c83dcfb6f1a bearermanagement/mpm/inc/mpmserver.h --- a/bearermanagement/mpm/inc/mpmserver.h Wed Jun 09 10:07:12 2010 +0300 +++ b/bearermanagement/mpm/inc/mpmserver.h Mon Jun 21 16:06:29 2010 +0300 @@ -352,18 +352,21 @@ TConnectionState& aState ); /** - * Checks if the connection is started for the Iap Id. + * Checks if the connection is started for the Iap Id, + * returning the state. * @since 3.2 * @param aIapId IAP Id of the connection * @param aConnId Connection Id + * @return Connection State, EIdle if not found */ - TBool CheckIfStarted( const TUint32 aIapId, + TConnectionState CheckUsageOfIap( const TUint32 aIapId, const TConnectionId aConnId ); /** - * Checks if a connection is started with wlan iap. + * Checks if any WLAN connection is started. * @since 3.2 * @param aCdbAccess + * @return IAP ID of the started WLAN connection, zero if not found */ TUint32 IsWlanConnectionStartedL( const CMPMCommsDatAccess* aCdbAccess ); @@ -421,6 +424,7 @@ * preferred IAP notifications. * @since 3.2 * @param aConnId Connection Id + * @return ETrue if registered */ TBool RegisteredForBMPrefIAP( const TConnectionId aConnId ); @@ -623,8 +627,9 @@ void AppendWlanQueryQueueL( CMPMWlanQueryDialog* aDlg ); /** - * Removes the first item from the iWlanQueryQueue. + * Removes the dialog from the iWlanQueryQueue. * @since 3.2 + * @param aDlg dialog to be removed. */ inline void RemoveFromWlanQueryQueue( CMPMWlanQueryDialog* aDlg ); @@ -704,6 +709,7 @@ * Returns the Commsdat access instance * * @since 3.2 + * @return Commsdat access instance. */ inline CMPMCommsDatAccess* CommsDatAccess(); @@ -719,6 +725,7 @@ * Starts forced roaming sequence to connected wlan * * @param aIapInfo Info about available IAPs + * @return Always zero... * @since 5.2 */ static TInt StartForcedRoamingToConnectedWlanL( TAny* aUpdater ); @@ -735,6 +742,7 @@ * Checks whether phone is in visitor network. * * @since 5.2 + * @return ETrue if phone is in visitor network, EFalse otherwise */ TBool IsVisitorNetwork() const; @@ -742,6 +750,7 @@ * Returns the RoamingWatcher pointer * * @since 5.2 + * @return RoamingWatcher pointer */ inline CMPMRoamingWatcher* RoamingWatcher() const; @@ -759,7 +768,11 @@ CSession2* NewSessionL( const TVersion& aVersion, const RMessage2& aMessage) const; - // Stops connection of certain IAP, zero for all connections + /** + * Stops either all connections or a certain IAP + * + * @param IAP ID to be stopped, zero for all connections + */ void StopConnections( TInt aIapId = 0 ); public: @@ -867,24 +880,28 @@ /** * Offline mode watcher updates the mode variable stored by MPM server. * @since 5.2 + * @param aNewModeValue New offline mode value */ - void UpdateOfflineMode( TInt newModeValue ); + void UpdateOfflineMode( TInt aNewModeValue ); /** * Returns true if the phone is in offline mode. * @since 5.2 + * @return ETrue if phone is in offline mode, EFalse otherwise. */ TBool IsPhoneOffline(); /** * Tells the "Use WLAN in offline mode" query response. * @since 5.2 + * @return Response of offline mode query (Undefined if not executed) */ TOfflineWlanQueryResponse OfflineWlanQueryResponse(); /** * Called when the "Use WLAN in offline mode" query has been responded. * @since 5.2 + * @param aResponse Sets the Offline mode query response value. */ void SetOfflineWlanQueryResponse( TOfflineWlanQueryResponse aResponse); diff -r 04408506c6e0 -r 4c83dcfb6f1a bearermanagement/mpm/src/mpmiapselection.cpp --- a/bearermanagement/mpm/src/mpmiapselection.cpp Wed Jun 09 10:07:12 2010 +0300 +++ b/bearermanagement/mpm/src/mpmiapselection.cpp Mon Jun 21 16:06:29 2010 +0300 @@ -493,17 +493,7 @@ // Check if any suitable IAP's were found, if not then complete selection with error code if ( validateIapId == 0 ) { - if ( !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) && - ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeDefault || - ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeExplicit && - iCommsDatAccess->IsInternetSnapL( 0, snap ) ) ) ) - { - ImplicitConnectionL(); - } - else - { - ChooseIapComplete( KErrNotFound, NULL ); - } + ChooseIapComplete( KErrNotFound, NULL ); CleanupStack::PopAndDestroy( &availableIAPList ); return; } @@ -737,9 +727,10 @@ !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableNotes ) ) { - TBool connectionAlreadyActive = - iSession->MyServer().CheckIfStarted( aPolicyPref->IapId(), - iSession->ConnectionId() ); + TConnectionState state = + iSession->MyServer().CheckUsageOfIap( aPolicyPref->IapId(), + iSession->ConnectionId() ); + TBool connectionAlreadyActive = (state == EStarted || state == EStarting || state == ERoaming); if ( !connectionAlreadyActive && ( iSession->IsMMSIap( aPolicyPref->IapId() ) == EFalse ) ) { diff -r 04408506c6e0 -r 4c83dcfb6f1a bearermanagement/mpm/src/mpmserver.cpp --- a/bearermanagement/mpm/src/mpmserver.cpp Wed Jun 09 10:07:12 2010 +0300 +++ b/bearermanagement/mpm/src/mpmserver.cpp Mon Jun 21 16:06:29 2010 +0300 @@ -701,26 +701,25 @@ } // ----------------------------------------------------------------------------- -// CMPMServer::CheckIfStarted +// CMPMServer::CheckUsageOfIap // ----------------------------------------------------------------------------- // -TBool CMPMServer::CheckIfStarted( const TUint32 aIapId , - const TConnectionId aConnId ) +TConnectionState CMPMServer::CheckUsageOfIap( const TUint32 aIapId , + const TConnectionId aOwnConnId ) { - MPMLOGSTRING3( "CMPMServer::CheckIfStarted - aIapId = %i, aConnId = 0x%x", - aIapId, aConnId ) + MPMLOGSTRING3( "CMPMServer::CheckUsageOfIap - aIapId = %i, aOwnConnId = 0x%x", + aIapId, aOwnConnId ) - TConnectionState state( EIdle ); - TBool stopLoop( EFalse ); + TConnectionState state = EIdle; // Loop all connections until EStarted is found or no more connections // - for ( TInt i = 0; ( ( i < iActiveBMConns.Count() ) && !stopLoop ); i++ ) + for ( TInt i = 0; i < iActiveBMConns.Count(); i++ ) { // Check if IAP Id matches; exclude matching with own connection // if ( iActiveBMConns[i].iConnInfo.iIapId == aIapId && - iActiveBMConns[i].iConnInfo.iConnId != aConnId) + iActiveBMConns[i].iConnInfo.iConnId != aOwnConnId) { state = iActiveBMConns[i].iConnInfo.iState; @@ -728,7 +727,7 @@ // if ( state == EStarted ) { - stopLoop = ETrue; + break; // Breaks the for loop } } } @@ -738,44 +737,33 @@ { case EStarting: { - MPMLOGSTRING( "CMPMServer::CheckIfStarted - Starting" ) + MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Starting" ) break; } case EStarted: { - MPMLOGSTRING( "CMPMServer::CheckIfStarted - Started" ) + MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Started" ) break; } case EIdle: { - MPMLOGSTRING( "CMPMServer::CheckIfStarted - Idle" ) + MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Idle" ) break; } case ERoaming: { - MPMLOGSTRING( "CMPMServer::CheckIfStarted - Roaming" ) + MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Roaming" ) break; } default: { - MPMLOGSTRING( "CMPMServer::CheckIfStarted - Unknown" ) + MPMLOGSTRING( "CMPMServer::CheckUsageOfIap - Unknown" ) break; } } #endif // _DEBUG - //Return true incase the matching connection is in EStarting state also because - //sometimes when connections are started simultaneously (for same iapID) - //the first connection may still be in EStarting state. - // - if ( state == EStarted || state == EStarting ) - { - return ETrue; - } - else - { - return EFalse; - } + return state; } // ----------------------------------------------------------------------------- diff -r 04408506c6e0 -r 4c83dcfb6f1a bearermanagement/mpm/src/mpmserversession.cpp --- a/bearermanagement/mpm/src/mpmserversession.cpp Wed Jun 09 10:07:12 2010 +0300 +++ b/bearermanagement/mpm/src/mpmserversession.cpp Mon Jun 21 16:06:29 2010 +0300 @@ -813,8 +813,10 @@ // check whether a started connection exists which already // uses this IAP. If so, it won't need to be confirmed again - // - if( iMyServer.CheckIfStarted( aIapId, iConnId ) ) + // + TConnectionState state = iMyServer.CheckUsageOfIap( aIapId, iConnId ); + + if ( state == EStarted || state == EStarting || state == ERoaming ) { MPMLOGSTRING( "CMPMServerSession::IsConfirmFirstL - IAP already started, \ @@ -2872,7 +2874,8 @@ if ( !( iIapSelection->MpmConnPref().NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableNotes) ) { - TBool connectionAlreadyActive = iMyServer.CheckIfStarted( aIapId, iConnId ); + TConnectionState state = iMyServer.CheckUsageOfIap( aIapId, iConnId ); + TBool connectionAlreadyActive = (state == EStarted || state == EStarting || state == ERoaming); CConnectionUiUtilities* connUiUtils = NULL; if (!connectionAlreadyActive ) { diff -r 04408506c6e0 -r 4c83dcfb6f1a bearermanagement/mpm/src/mpmwlanquerydialog.cpp --- a/bearermanagement/mpm/src/mpmwlanquerydialog.cpp Wed Jun 09 10:07:12 2010 +0300 +++ b/bearermanagement/mpm/src/mpmwlanquerydialog.cpp Mon Jun 21 16:06:29 2010 +0300 @@ -495,8 +495,9 @@ } // if easy wlan iap and easy wlan is not already started // - else if( iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId ) && - !iIapSelection.Session()->MyServer().CheckIfStarted( iWlanIapId, iIapSelection.Session()->ConnectionId() ) && + else if( iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId ) && + iIapSelection.Session()->MyServer().CheckUsageOfIap( + iWlanIapId, iIapSelection.Session()->ConnectionId() ) != EStarted && iNetworkPrefs().iSsId.Length() == 0 && iOverrideStatus == KErrNone ) { diff -r 04408506c6e0 -r 4c83dcfb6f1a cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.h --- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.h Wed Jun 09 10:07:12 2010 +0300 +++ b/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.h Mon Jun 21 16:06:29 2010 +0300 @@ -241,6 +241,11 @@ * Flag is set when wlan is supported */ TBool iIsWlanSupported; + + /** + * Flag is uised to ignore duplicate Window's events + */ + TBool iProcessing; }; diff -r 04408506c6e0 -r 4c83dcfb6f1a cmmanager/gsconnsettingsplugin/inc/gsconnsettingsselectiondlg.h --- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsselectiondlg.h Wed Jun 09 10:07:12 2010 +0300 +++ b/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsselectiondlg.h Mon Jun 21 16:06:29 2010 +0300 @@ -19,7 +19,6 @@ #define GSCONNSETTINGSSELECTIONDLG_H #include -#include class CGSConnSettingsSelectionDlg : public CAknRadioButtonSettingPage { @@ -32,21 +31,12 @@ * @param aResourceID Text at top of setting pane * @param aCurrentSelectionIndex Current slected item * @param aItemArray Pointer to array of loaded resource texts for radio buttons - * @param aPopupResource ID of popup note resource array * @return * */ static CGSConnSettingsSelectionDlg* NewL(TInt aResourceID, TInt& aCurrentSelectionIndex, - const MDesCArray* aItemArray, - TInt aPopupResource); - - /** - * Symbian OS two-phased constructor - * - * @param aPopupResource ID of popup note resource array - */ - void ConstructL(TInt aPopupResource); + const MDesCArray* aItemArray ); /** * C++ default constructor. @@ -54,45 +44,24 @@ * @param aResourceID Text at top of setting pane * @param aCurrentSelectionIndex Current slected item * @param aItemArray Pointer to array of loaded resource texts for radio buttons - * @param aPopupResource ID of popup note resource array */ CGSConnSettingsSelectionDlg( TInt aResourceID, TInt& aCurrentSelectionIndex, - const MDesCArray* aItemArray, - TInt aPopupResource); + const MDesCArray* aItemArray ); + /** * Destructor. */ virtual ~CGSConnSettingsSelectionDlg(); private: + //From CAknListBoxSettingPage void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); //From CAknSettingPage TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType); -private: - //New Functions - - /** - * Displays info popup on the screen - * - */ - void ShowInfoPopupL(); - -private: //Private data - - /** - * Pointer to popup note controller. Owned. - */ - CAknInfoPopupNoteController* iPopupController; - - /** - * Pointer to loaded popup note resources. Owned. - */ - CDesCArrayFlat* iPopupItems; - }; #endif // GSCONNSETTINGSSELECTIONDLG_H diff -r 04408506c6e0 -r 4c83dcfb6f1a cmmanager/gsconnsettingsplugin/loc/gsconnsettingsplugin.loc --- a/cmmanager/gsconnsettingsplugin/loc/gsconnsettingsplugin.loc Wed Jun 09 10:07:12 2010 +0300 +++ b/cmmanager/gsconnsettingsplugin/loc/gsconnsettingsplugin.loc Mon Jun 21 16:06:29 2010 +0300 @@ -120,20 +120,5 @@ //r: 5.2 #define qtn_occ_sett_data_usage_home_nw_disabled "Disabled" -//d: Info popup note for "Known" selection of "Join WLAN networks" -//l: popup_preview_text_window_t1/opt5 -//w: -//r: 5.2 -// -#define qtn_occ_info_popup_wlan_usage_known "Phone will automatically switch from cellular data connection to a known WLAN network when available." - - -//d: Info popup note for "Manual" selection of "Join WLAN networks" -//l: popup_preview_text_window_t1/opt5 -//w: -//r: 5.2 -// -#define qtn_occ_info_popup_wlan_usage_manual "Phone will not switch from cellular data connection to a WLAN connection automatically. WLAN network can be taken into use via WLAN wizard." - // End of File diff -r 04408506c6e0 -r 4c83dcfb6f1a cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugin.cpp --- a/cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugin.cpp Wed Jun 09 10:07:12 2010 +0300 +++ b/cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugin.cpp Mon Jun 21 16:06:29 2010 +0300 @@ -60,6 +60,7 @@ // CGSConnSettingsPlugin::CGSConnSettingsPlugin() : iResourceLoader( *iCoeEnv ) + , iProcessing( EFalse ) { } @@ -329,8 +330,16 @@ // In these cases the plugin is a dialog: case EGSItemTypeSettingDialog: case EGSItemTypeSingleLargeDialog: - selectedPlugin->HandleSelection( EGSSelectionByMenu ); - break; + // Ignore duplicate Window's events + if( iProcessing ) + { + return; + } + + iProcessing = ETrue; + selectedPlugin->HandleSelection( EGSSelectionByMenu ); + iProcessing = EFalse; + break; default: break; } diff -r 04408506c6e0 -r 4c83dcfb6f1a cmmanager/gsconnsettingsplugin/src/gsconnsettingsselectiondlg.cpp --- a/cmmanager/gsconnsettingsplugin/src/gsconnsettingsselectiondlg.cpp Wed Jun 09 10:07:12 2010 +0300 +++ b/cmmanager/gsconnsettingsplugin/src/gsconnsettingsselectiondlg.cpp Mon Jun 21 16:06:29 2010 +0300 @@ -17,7 +17,6 @@ // Includes #include "gsconnsettingsselectiondlg.h" -#include #include #include #include @@ -34,42 +33,25 @@ // CGSConnSettingsSelectionDlg::NewL // --------------------------------------------------------------------------- // -CGSConnSettingsSelectionDlg* CGSConnSettingsSelectionDlg::NewL(TInt aResourceID, +CGSConnSettingsSelectionDlg* CGSConnSettingsSelectionDlg::NewL( TInt aResourceID, TInt& aCurrentSelectionIndex, - const MDesCArray* aItemArray, - TInt aPopupResource) + const MDesCArray* aItemArray ) { CGSConnSettingsSelectionDlg* self = new( ELeave ) CGSConnSettingsSelectionDlg( aResourceID, aCurrentSelectionIndex, - aItemArray, - aPopupResource ); - CleanupStack::PushL( self ); - self->ConstructL( aPopupResource ); - CleanupStack::Pop( self ); + aItemArray ); return self; } // --------------------------------------------------------------------------- -// CGSConnSettingsSelectionDlg::ConstructL -// --------------------------------------------------------------------------- -// -void CGSConnSettingsSelectionDlg::ConstructL( TInt aPopupResource) - { - iPopupController = CAknInfoPopupNoteController::NewL(); - iPopupItems = iCoeEnv->ReadDesC16ArrayResourceL( aPopupResource ); -// ShowInfoPopupL(); - } - -// --------------------------------------------------------------------------- // CGSConnSettingsSelectionDlg::CGSConnSettingsSelectionDlg // --------------------------------------------------------------------------- // CGSConnSettingsSelectionDlg::CGSConnSettingsSelectionDlg( TInt aResourceID, TInt& aCurrentSelectionIndex, - const MDesCArray* aItemArray, - TInt /* aPopupResource */) + const MDesCArray* aItemArray ) : CAknRadioButtonSettingPage( aResourceID, aCurrentSelectionIndex, @@ -84,16 +66,6 @@ // CGSConnSettingsSelectionDlg::~CGSConnSettingsSelectionDlg() { - if ( iPopupController ) - { - delete iPopupController; - } - - if ( iPopupItems ) - { - iPopupItems->Reset(); - delete iPopupItems; - } } // --------------------------------------------------------------------------- @@ -102,17 +74,8 @@ // TKeyResponse CGSConnSettingsSelectionDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType) { - TKeyResponse response ( EKeyWasNotConsumed ); - + TKeyResponse response( EKeyWasNotConsumed ); response = CAknRadioButtonSettingPage::OfferKeyEventL( aKeyEvent, aType ); - - //EKeyNull enables here launching of popup note immediately when we enter the setting page - if ( aKeyEvent.iCode == EKeyNull || - aKeyEvent.iCode == EKeyUpArrow || - aKeyEvent.iCode == EKeyDownArrow ) - { - ShowInfoPopupL(); - } return response; } @@ -124,28 +87,7 @@ CEikListBox* aListBox, TListBoxEvent aEventType ) { - if ( aEventType == EEventItemClicked || - aEventType == EEventItemSingleClicked ) - { - ShowInfoPopupL(); - } - CAknRadioButtonSettingPage::HandleListBoxEventL(aListBox, aEventType); - } - -// --------------------------------------------------------------------------- -// CGSConnSettingsSelectionDlg::ShowInfoPopupL -// --------------------------------------------------------------------------- -// -void CGSConnSettingsSelectionDlg::ShowInfoPopupL() - { - TInt currentIndex = this->ListBoxControl()->CurrentItemIndex(); - - iPopupController->HideInfoPopupNote(); - - iPopupController->SetTextL( (*iPopupItems)[currentIndex] ); - iPopupController->SetTimeDelayBeforeShow( 500 ); - iPopupController->SetTimePopupInView( 0 ); //Zero means that popup stays in screen until it is destroyed - iPopupController->ShowInfoPopupNote(); + CAknRadioButtonSettingPage::HandleListBoxEventL( aListBox, aEventType ); } // End of file diff -r 04408506c6e0 -r 4c83dcfb6f1a connectionutilities/ConnectionDialogs/src/ConnectionDialogsNotifBase.cpp --- a/connectionutilities/ConnectionDialogs/src/ConnectionDialogsNotifBase.cpp Wed Jun 09 10:07:12 2010 +0300 +++ b/connectionutilities/ConnectionDialogs/src/ConnectionDialogsNotifBase.cpp Mon Jun 21 16:06:29 2010 +0300 @@ -25,8 +25,13 @@ #include #include +#include "ConnectionDialogsLogger.h" #include "ConnectionDialogsNotifBase.h" +#ifdef _DEBUG +#include +#endif + // CONSTANTS // ROM folder @@ -157,6 +162,8 @@ { TBool retval( EFalse ); + CLOG_ENTERFN( "CConnectionDialogsNotifBase::AutolockOn" ); + #ifdef RD_STARTUP_CHANGE TInt err( KErrNone ); TInt autolockOn( 0 ); @@ -164,8 +171,18 @@ err = RProperty::Get( KPSUidCoreApplicationUIs, KCoreAppUIsAutolockStatus, autolockOn ); - retval = (err == KErrNone && autolockOn > EAutolockOff); + // In boot there may come EAutolockStatusUninitialized, when it should be EAutolockOn... + retval = (err == KErrNone && autolockOn != EAutolockOff); + +#ifdef _DEBUG + RDebug::Print( _L("CConnectionDialogsNotifBase::AutolockOn: autolockOn: %d"), autolockOn ); + RDebug::Print( _L("CConnectionDialogsNotifBase::AutolockOn: err: %d"), err ); + RDebug::Print( _L("CConnectionDialogsNotifBase::AutolockOn: %d"), retval ); #endif + +#endif // RD_STARTUP_CHANGE + + CLOG_LEAVEFN( "CConnectionDialogsNotifBase::AutolockOn" ); return retval; }