--- a/alwayson_net_plugin/pdpcontextmanager2/inc/caosettings.h Tue Jan 26 12:12:48 2010 +0200
+++ b/alwayson_net_plugin/pdpcontextmanager2/inc/caosettings.h Tue Feb 02 00:24:11 2010 +0200
@@ -28,6 +28,7 @@
// FORWARD DECLARATIONS
class MAOSettingsObserver;
class CRepository;
+class MAOStateContext;
// CONSTANTS
@@ -67,9 +68,11 @@
*
* @since S60 v3.1
* @param aObserver observer for setting changes
+ * @param aStateContext reference to MAOStateContext
* @return pointer to the created CAOSettings object
*/
- static CAOSettings* NewL( MAOSettingsObserver& aObserver );
+ static CAOSettings* NewL( MAOSettingsObserver& aObserver,
+ MAOStateContext& aStateContext );
/**
* Destructor
@@ -218,8 +221,10 @@
*
* @since S60 v3.1
* @param aObserver observer for setting changes
+ * @param aStateContext reference to MAOStateContext
*/
- CAOSettings( MAOSettingsObserver& aObserver );
+ CAOSettings( MAOSettingsObserver& aObserver,
+ MAOStateContext& aStateContext );
/**
* Default Symbian 2nd-phase constructor
@@ -376,6 +381,11 @@
* Array of iap id and linger interval pairs
*/
RArray< TLingerSetting > iLingerSettings;
+
+ /**
+ * State context from CAOServer.
+ */
+ MAOStateContext& iStateContext;
};
#endif // C_CAOSETTINGS_H
--- a/alwayson_net_plugin/pdpcontextmanager2/src/caoserver.cpp Tue Jan 26 12:12:48 2010 +0200
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/caoserver.cpp Tue Feb 02 00:24:11 2010 +0200
@@ -214,7 +214,7 @@
ConfigureCustomAPIL();
// Create services
- iSettings = CAOSettings::NewL( *this );
+ iSettings = CAOSettings::NewL( *this, *this );
iConnectionManager = CAOConnectionManager::NewL( *this, *iSettings );
iTimer = CAOTimer::NewL( *this, *iSettings );
@@ -970,7 +970,7 @@
}
}
}
-
+
// ---------------------------------------------------------------------------
// CAOServer::InitStatePoolL
// ---------------------------------------------------------------------------
--- a/alwayson_net_plugin/pdpcontextmanager2/src/caosettings.cpp Tue Jan 26 12:12:48 2010 +0200
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/caosettings.cpp Tue Feb 02 00:24:11 2010 +0200
@@ -26,6 +26,8 @@
#include "logger.h"
#include "maosettingsobserver.h"
#include "pdpcontextmanagerinternalcrkeys.h"
+#include "maostatecontext.h"
+#include "maoconnectionmanager.h"
// UNNAMED NAMESPACE FOR LOCAL DEFINITIONS
namespace
@@ -68,11 +70,12 @@
// CAOSettings::NewL
// ---------------------------------------------------------------------------
//
-CAOSettings* CAOSettings::NewL( MAOSettingsObserver& aObserver )
+CAOSettings* CAOSettings::NewL( MAOSettingsObserver& aObserver,
+ MAOStateContext& aStateContext )
{
LOG_1( _L("CAOSettings::NewL") );
- CAOSettings* self = new( ELeave ) CAOSettings( aObserver );
+ CAOSettings* self = new( ELeave ) CAOSettings( aObserver, aStateContext );
CleanupStack::PushL( self );
self->ConstructL();
@@ -104,14 +107,16 @@
// CAOSettings::CAOSettings
// ---------------------------------------------------------------------------
//
-CAOSettings::CAOSettings( MAOSettingsObserver& aObserver ):
+CAOSettings::CAOSettings( MAOSettingsObserver& aObserver,
+ MAOStateContext& aStateContext ):
CActive( CActive::EPriorityStandard ),
iObserver( aObserver ),
iIAP( KDefaultIAPUid ),
iRetryTimerValue( KDefaultRetryInterval ),
iSupportedInHPLMN( EFalse ),
iSupportedInVPLMN( EFalse ),
- iLingerTimerValue( KLingerOff )
+ iLingerTimerValue( KLingerOff ),
+ iStateContext( aStateContext )
{
LOG_1( _L("CAOSettings::CAOSettings") );
@@ -587,13 +592,30 @@
TInt value( 0 );
TInt err = repository->Get( KCurrentCellularDataUsage, value );
- if ( err == KErrNone && value == ECmCellularDataUsageDisabled )
+ if ( err == KErrNone )
{
- // Cellular connection is not allowed by user
- allowed = EFalse;
- }
+ if ( value == ECmCellularDataUsageDisabled )
+ {
+ // Cellular connection is not allowed by user
+ allowed = EFalse;
+ }
+ else
+ {
+ MAOConnectionManager::TNetworkType nwType =
+ iStateContext.ConnectionManager().NetworkType();
+
+ if ( ( nwType == MAOConnectionManager::EVPLMN ) &&
+ ( value == ECmCellularDataUsageConfirm ) )
+ {
+ // Silent connection is not allowed (will fail)
+ // in visitor network if user has chosen confirm option.
+ allowed = EFalse;
+ }
+ }
+ }
}
-
+ LOG_2( _L("IsCellularAllowedByUser(): %d"), allowed );
+
delete repository;
return allowed;
}
--- a/apengine/apsettingshandlerui/inc/ApSelPopupList.h Tue Jan 26 12:12:48 2010 +0200
+++ b/apengine/apsettingshandlerui/inc/ApSelPopupList.h Tue Feb 02 00:24:11 2010 +0200
@@ -337,7 +337,6 @@
TBool iHelpSupported;
TBool iProtectionSupported;
TBool iDoExit;
- TInt iOldSelection;
};
#endif
--- a/apengine/apsettingshandlerui/src/ApSelPopupList.cpp Tue Jan 26 12:12:48 2010 +0200
+++ b/apengine/apsettingshandlerui/src/ApSelPopupList.cpp Tue Feb 02 00:24:11 2010 +0200
@@ -527,7 +527,6 @@
}
iList->SetCurrentItemIndexAndDraw( idx );
SelectCurrentItemL();
- iOldSelection = idx;
APSETUILOGGER_LEAVEFN( EListbox,"SelPopupList::SetSelectedL")
}
@@ -787,25 +786,11 @@
{
case EEventEnterKeyPressed:
case EEventItemDoubleClicked:
+ case EEventItemSingleClicked:
{
ProcessCommandL( EApSelCmdSelect );
break;
}
- case EEventItemSingleClicked:
- // Second click to the same item makes the selection and closes the
- // setting page, first click just moves the radio button mark.
- {
- if ( ListBoxControl()->CurrentItemIndex() == iOldSelection )
- {
- ProcessCommandL( EApSelCmdSelect );
- }
- else
- {
- CAknRadioButtonSettingPage::HandleListBoxEventL( aListBox, aEventType );
- iOldSelection = ListBoxControl()->CurrentItemIndex();
- }
- break;
- }
case EEventEditingStarted:
{
break;
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/group/cmpluginpacketdata.mmp Tue Jan 26 12:12:48 2010 +0200
+++ b/cmmanager/cmmgr/Plugins/cmpluginpacketdata/group/cmpluginpacketdata.mmp Tue Feb 02 00:24:11 2010 +0200
@@ -75,6 +75,8 @@
LIBRARY eikcore.lib egul.lib
LIBRARY eikctl.lib cone.lib
-LIBRARY fbscli.lib efsrv.lib
+LIBRARY fbscli.lib efsrv.lib
+LIBRARY featmgr.lib
+LIBRARY centralrepository.lib
LIBRARY AknSkins.lib
\ No newline at end of file
--- a/cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp Tue Jan 26 12:12:48 2010 +0200
+++ b/cmmanager/cmmgr/Plugins/cmpluginpacketdata/src/cmpluginpacketdata.cpp Tue Feb 02 00:24:11 2010 +0200
@@ -26,6 +26,10 @@
#include <AknQueryDialog.h>
#include <StringLoader.h>
#include <cmmanager.rsg>
+#include <featmgr.h> // FeatureManager
+#include <centralrepository.h> // CRepository
+#include <CoreApplicationUIsSDKCRKeys.h> // KCRUidCoreApplicationUIs,
+
// User
#include "cmpluginpacketdata.h"
#include <cmpluginpacketdatadef.h>
@@ -217,14 +221,7 @@
// ======== MEMBER FUNCTIONS ========
class CCmPDCoverageCheck : public CActive
- {
- enum EPacketCoverageState
- {
- EServiceStatus,
- EPDPAttach,
- EPDPDetach,
- };
-
+ {
public:
CCmPDCoverageCheck();
@@ -236,15 +233,19 @@
virtual void DoCancel();
virtual void RunL();
+
+ private:
+
+ TBool IsPhoneOfflineL() const;
private:
- TUint32 iProgState;
TBool iCoverage;
CActiveSchedulerWait iWait;
RTelServer iServer;
RPhone iPhone;
- RPacketService iService;
+ RPacketService iService;
+ RPacketService::TRegistrationStatus iNwRegStatus;
};
// ----------------------------------------------------------------------------
@@ -284,37 +285,23 @@
//
void CCmPDCoverageCheck::RunL()
{
- switch( iProgState )
+ if( !iStatus.Int() )
{
- case EPDPAttach:
+ CLOG_WRITE_1( "CCmPDCoverageCheck::RunL: iNwRegStatus: [%d]", iNwRegStatus );
+
+ if ( iNwRegStatus == RPacketService::ERegisteredOnHomeNetwork ||
+ iNwRegStatus == RPacketService::ERegisteredRoaming ||
+ iNwRegStatus == RPacketService::ENotRegisteredButAvailable )
{
- if( !iStatus.Int() )
- // PDP context created -> there's a usable PD coverage.
- {
- iService.Detach( iStatus );
- SetActive();
-
- iCoverage = ETrue;
- iProgState = EPDPDetach;
- }
- else
- // something went wrong -> no coverage.
- {
- iWait.AsyncStop();
- }
- }
- break;
-
- case EPDPDetach:
- {
- iWait.AsyncStop();
- }
- break;
-
- default:
- {
- User::Leave( KErrCorrupt );
- }
+ iCoverage = ETrue;
+ }
+ iWait.AsyncStop();
+ }
+ else
+ // something went wrong -> no coverage.
+ {
+ CLOG_WRITE_1( "CCmPDCoverageCheck::RunL: FAILED: [%d]", iStatus.Int() );
+ iWait.AsyncStop();
}
}
@@ -324,50 +311,59 @@
//
TBool CCmPDCoverageCheck::IsThereCoverageL()
{
- iProgState = EServiceStatus;
iCoverage = EFalse;
- User::LeaveIfError( iServer.Connect() );
- CLOG_WRITE( "Server open" );
+ if ( !IsPhoneOfflineL() )
+ {
+ User::LeaveIfError( iServer.Connect() );
+ CLOG_WRITE( "Server open" );
- RTelServer::TPhoneInfo info;
- User::LeaveIfError( iServer.GetPhoneInfo( 0, info ) );
- CLOG_WRITE( "Phone info ok" );
+ RTelServer::TPhoneInfo info;
+ User::LeaveIfError( iServer.GetPhoneInfo( 0, info ) );
+ CLOG_WRITE( "Phone info ok" );
- User::LeaveIfError( iPhone.Open(iServer, info.iName ) );
- CLOG_WRITE( "Phone open" );
-
- User::LeaveIfError( iService.Open( iPhone ) );
- CLOG_WRITE( "service ok" );
+ User::LeaveIfError( iPhone.Open(iServer, info.iName ) );
+ CLOG_WRITE( "Phone open" );
- RPacketService::TStatus status;
- User::LeaveIfError( iService.GetStatus( status ) );
- if( status == RPacketService::EStatusAttached ||
- status == RPacketService::EStatusActive ||
- status == RPacketService::EStatusSuspended )
- // Attached/active/suspened, so there's a coverage
- {
- iCoverage = ETrue;
- }
- else if( status == RPacketService::EStatusUnattached )
- {
- iProgState = EPDPAttach;
- iService.Attach( iStatus );
+ User::LeaveIfError( iService.Open( iPhone ) );
+ CLOG_WRITE( "service ok" );
+
+ iService.GetNtwkRegStatus( iStatus, iNwRegStatus );
SetActive();
iWait.Start();
+
+ User::LeaveIfError( iStatus.Int() );
}
- else
- {
- CLOG_WRITE( "Unknown state" );
- }
-
-
- User::LeaveIfError( iStatus.Int() );
return iCoverage;
}
// ----------------------------------------------------------------------------
+// CCmPDCoverageCheck::IsPhoneOfflineL
+// ----------------------------------------------------------------------------
+//
+TBool CCmPDCoverageCheck::IsPhoneOfflineL() const
+ {
+ if ( FeatureManager::FeatureSupported( KFeatureIdOfflineMode ) )
+ {
+ CRepository* repository = CRepository::NewLC( KCRUidCoreApplicationUIs );
+ TInt connAllowed( ECoreAppUIsNetworkConnectionAllowed );
+
+ repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed );
+ CleanupStack::PopAndDestroy( repository );
+
+ if ( !connAllowed )
+ {
+ CLOG_WRITE( "Phone is in offline mode." );
+ return ETrue;
+ }
+ }
+
+ CLOG_WRITE( "Phone is NOT in offline mode." );
+ return EFalse;
+ }
+
+// ----------------------------------------------------------------------------
// CCmPluginPacketData::NewOutgoingL
// ----------------------------------------------------------------------------
//
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/data/cmpluginvpnui.rss Tue Jan 26 12:12:48 2010 +0200
+++ b/cmmanager/cmmgr/Plugins/cmpluginvpn/data/cmpluginvpnui.rss Tue Feb 02 00:24:11 2010 +0200
@@ -224,10 +224,10 @@
// r_vpn_real_cm_selection_list
// real connection selection dialog with destination support
// --------------------------------------------------------------------------
-RESOURCE DIALOG r_vpn_real_cm_selection_list
+RESOURCE AVKON_LIST_QUERY r_vpn_real_cm_selection_list
{
flags = EGeneralQueryFlags;
- buttons = r_softkeys_options_cancel__select;
+ softkeys = r_softkeys_options_cancel__select;
items =
{
AVKON_LIST_QUERY_DLG_LINE
@@ -237,6 +237,7 @@
listtype = EAknCtDoubleLargeGraphicPopupMenuListBox;
listbox = AVKON_LIST_QUERY_LIST
{
+ flags = EAknListBoxSelectionList;
};
heading = qtn_netw_conset_prmpt_vpn_real_connection;
};
@@ -299,11 +300,13 @@
{
command = ECmManagerUiCmdDestSelect;
txt = qtn_set_cmd_select;
+ flags = EEikMenuItemAction;
}
,MENU_ITEM
{
command = ECmManagerUiCmdCMSelect;
txt = qtn_netw_conset_options_select_method;
+ flags = EEikMenuItemSpecific;
}
,MENU_ITEM
{
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/inc/cmpvpnnextlayerselectdlg.h Tue Jan 26 12:12:48 2010 +0200
+++ b/cmmanager/cmmgr/Plugins/cmpluginvpn/inc/cmpvpnnextlayerselectdlg.h Tue Feb 02 00:24:11 2010 +0200
@@ -20,13 +20,10 @@
#define CMPVPN_NEXT_LAYER_SELECT_DLG_H
#include <e32base.h>
-#include <eikmobs.h> // MEikMenuObserver
-#include <aknPopup.h> // CAknPopupList
+#include <aknlistquerydialog.h> // CAknListQueryDialog
#include <ConeResLoader.h> // resource reader
-class CEikFormattedCellListBox;
-class CEikMenuBar;
class CEikonEnv;
class CCmPluginBaseEng;
class CCmManagerImpl;
@@ -41,8 +38,7 @@
*
* @since S60 v3.2
*/
-NONSHARABLE_CLASS( CmPluginVpnNextLayerSelectDlg ) : public CAknPopupList,
- public MEikMenuObserver
+NONSHARABLE_CLASS( CmPluginVpnNextLayerSelectDlg ) : public CAknListQueryDialog
{
public: // Constructors and destructor
@@ -56,7 +52,8 @@
* Destructor.
*/
virtual ~CmPluginVpnNextLayerSelectDlg();
-
+
+
private: // Constructor
/**
@@ -65,30 +62,50 @@
CmPluginVpnNextLayerSelectDlg( CCmPluginBaseEng& aCmPluginBaseEng,
RArray<TUint32>& aBindableMethods,
TBool& aSnapSelected,
- TUint32& aNextLayerId );
+ TUint32& aNextLayerId,
+ TInt aDummyIndex );
/**
* Second phase constructor. Leaves on failure.
*/
void ConstructL();
-
- public: // From MEikMenuObserver
+
+ public: // new
+
+ static TInt CancelAsynchronouslyL( TAny* aObject );
+
+
+ protected: // From CAknListQueryDialog
+
+ /**
+ * @see CAknListQueryDialog
+ */
+ virtual void PreLayoutDynInitL();
/**
- * See base class
+ * @see CAknListQueryDialog
+ */
+ TBool OkToExitL( TInt aButtonId );
+
+ public: // From CAknListQueryDialog
+
+ /**
+ * @see CAknListQueryDialog
*/
void ProcessCommandL( TInt aCommandId );
-
+
/**
- * See base class
- */
- void SetEmphasis( CCoeControl* aMenuControl, TBool aEmphasis );
-
- /**
- * See base class
+ * @see CAknListQueryDialog
*/
void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
+ /**
+ * @see CAknListQueryDialog
+ */
+ void HandleListBoxEventL( CEikListBox* aListBox,
+ TListBoxEvent aEventType );
+
+
public: // From CCoeControl
/**
@@ -99,13 +116,7 @@
* @param aContext the returned help context
*/
void GetHelpContext( TCoeHelpContext& aContext ) const;
-
- /**
- * From CCoeControl, makes control visible/invisible.
- * @param aVisible ETrue if visible, EFalse if invisible.
- */
- void MakeVisible( TBool aVisible );
-
+
/**
* From CCoeControl
*
@@ -116,38 +127,8 @@
*/
TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
TEventCode aType );
-
- // From MEikListBoxObserver
- void HandleListBoxEventL( CEikListBox* aListBox,
- TListBoxEvent aEventType );
-
- public: // new functions
-
- /**
- * Display the Options menu
- *
- *
- * @since S60 3.2
- */
- void DisplayMenuL();
-
- /**
- * Hide the Options menu.
- *
- *
- * @since S60 3.2
- */
- void HideMenu();
-
- /**
- * Is the Options menu opened?
- *
- *
- * @since S60 3.2
- * @return ETrue if showing
- */
- TBool MenuShowing() const;
-
+
+
private: // new functions
/*
@@ -169,9 +150,7 @@
HBufC* FormatListItemTextsLC( TInt aFirstLineResId,
TInt aSecondLineResId,
TInt aIconIndex );
-
-
-
+
/**
*/
HBufC* FormatListItemTextsLC( TInt aFirstLineResId,
@@ -202,8 +181,6 @@
TBool ShowCMSelectionDlgL( TUint32 aDestinationId,
TUint32& aCmId );
- void InitialiseL();
-
void SetTextsAndIconsL();
void AppendDestinationTextsL( CCmDestinationImpl& aDestination,
@@ -216,7 +193,7 @@
void AppendEasyWlanL( CDesCArray& aItems,
CArrayPtr<CGulIcon>& aIcons );
-
+
private: // data members
@@ -224,17 +201,7 @@
* Eikon environment
*/
CEikonEnv& iMyEikonEnv;
-
- /**
- * Owned list box
- */
- CEikFormattedCellListBox* iMyListBox;
-
- /**
- * Owned menu bar.
- */
- CEikMenuBar* iMenuBar;
-
+
/**
* base class not owned
*/
@@ -275,5 +242,11 @@
*/
TBool iUncatItems;
+ /**
+ * One shot active object for asynchronous exiting with Cancel
+ */
+ CAsyncCallBack* iAsyncCancel;
+
+
};
#endif // CMPVPN_NEXT_LAYER_SELECT_DLG_H
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpluginvpn.cpp Tue Jan 26 12:12:48 2010 +0200
+++ b/cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpluginvpn.cpp Tue Feb 02 00:24:11 2010 +0200
@@ -1177,7 +1177,7 @@
iBindableMethods,
snapSelected,
nextLayerId );
- if ( dlg->ExecuteLD() )
+ if ( dlg->ExecuteLD( R_VPN_REAL_CM_SELECTION_LIST ) )
{
// Handle results
retVal = ETrue;
--- a/cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpvpnnextlayerselectdlg.cpp Tue Jan 26 12:12:48 2010 +0200
+++ b/cmmanager/cmmgr/Plugins/cmpluginvpn/src/cmpvpnnextlayerselectdlg.cpp Tue Feb 02 00:24:11 2010 +0200
@@ -60,7 +60,8 @@
new ( ELeave ) CmPluginVpnNextLayerSelectDlg( aCmPluginBaseEng,
aBindableMethods,
aSnapSelected,
- aNextLayerId );
+ aNextLayerId,
+ 0 );
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
@@ -75,8 +76,10 @@
CCmPluginBaseEng& aCmPluginBaseEng,
RArray<TUint32>& aBindableMethods,
TBool& aSnapSelected,
- TUint32& aNextLayerId )
- : iMyEikonEnv( *CEikonEnv::Static() )
+ TUint32& aNextLayerId,
+ TInt aDummyIndex )
+ : CAknListQueryDialog( &aDummyIndex )
+ , iMyEikonEnv( *CEikonEnv::Static() )
, iCmPluginBaseEng( aCmPluginBaseEng )
, iSnapSelected( aSnapSelected )
, iNextLayerId( aNextLayerId )
@@ -96,17 +99,13 @@
//
CmPluginVpnNextLayerSelectDlg::~CmPluginVpnNextLayerSelectDlg()
{
- iResourceReader.Close();
-
- if ( iMenuBar )
+ if ( iAsyncCancel )
{
- HideMenu();
- CEikonEnv::Static()->EikAppUi()->RemoveFromStack( iMenuBar );
- delete iMenuBar;
- iMenuBar = NULL;
+ delete iAsyncCancel;
+ iAsyncCancel = NULL;
}
-
- delete iMyListBox; iMyListBox = NULL;
+
+ iResourceReader.Close();
}
// --------------------------------------------------------------------------
@@ -114,49 +113,72 @@
// --------------------------------------------------------------------------
//
void CmPluginVpnNextLayerSelectDlg::ConstructL()
- {
+ {
LoadResourceL( KPluginVPNResDirAndFileName );
- InitialiseL();
- SetTextsAndIconsL();
- }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::InitialiseL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::InitialiseL()
- {
- LOGGER_ENTERFN( "CmPluginVpnNextLayerSelectDlg::InitialiseL" );
// get the EasyWlan id if it's supported
if ( FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ) )
{
iEasyWlanId = iCmManager.EasyWlanIdL();
- }
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CmPluginVpnNextLayerSelectDlg::CancelAsynchronouslyL
+// ---------------------------------------------------------------------------
+TInt CmPluginVpnNextLayerSelectDlg::CancelAsynchronouslyL( TAny* aObject )
+ {
+ CmPluginVpnNextLayerSelectDlg* myself =
+ static_cast< CmPluginVpnNextLayerSelectDlg* >( aObject );
- // Listbox
- iMyListBox = new ( ELeave ) CAknDoubleLargeGraphicPopupMenuStyleListBox;
+ myself->TryExitL( EAknSoftkeyCancel );
+ return 0;
+ }
+
+// ----------------------------------------------------------------------------
+// CmPluginVpnNextLayerSelectDlg::PreLayoutDynInitL
+// ----------------------------------------------------------------------------
+//
+void CmPluginVpnNextLayerSelectDlg::PreLayoutDynInitL()
+ {
+ CAknDialog::ConstructL( R_VPN_REAL_CM_SELECTION_MENUBAR );
- CAknPopupList::ConstructL(
- iMyListBox,
- R_SOFTKEYS_OPTIONS_CANCEL__SELECT,
- AknPopupLayouts::EMenuDoubleLargeGraphicWindow );
-
- TInt flags = 0;
- iMyListBox->ConstructL( this, flags );
- iMyListBox->CreateScrollBarFrameL( ETrue );
- iMyListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
- CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );
-
- // Menu
- CEikMenuBar* newMenuBar = new ( ELeave ) CEikMenuBar();
- CleanupStack::PushL( newMenuBar );
- newMenuBar->ConstructL( this, NULL, R_VPN_REAL_CM_SELECTION_MENUBAR );
- iMyEikonEnv.EikAppUi()->AddToStackL( newMenuBar,
- ECoeStackPriorityMenu,
- ECoeStackFlagRefusesFocus );
- iMenuBar = newMenuBar;
- CleanupStack::Pop( newMenuBar ); // ownership taken by 'this'
+ // Let the base class do its job first
+ CAknListQueryDialog::PreLayoutDynInitL();
+
+ SetTextsAndIconsL();
+ }
+
+// ----------------------------------------------------------------------------
+// CmPluginVpnNextLayerSelectDlg::OkToExitL
+// ----------------------------------------------------------------------------
+//
+TBool CmPluginVpnNextLayerSelectDlg::OkToExitL( TInt aButtonId )
+ {
+ TBool result = EFalse;
+
+ if ( aButtonId == EAknSoftkeyDone || aButtonId == EAknSoftkeyOk )
+ {
+ result = ETrue;
+ }
+ else if ( aButtonId == EAknSoftkeySelect )
+ {
+ ProcessCommandL( ECmManagerUiCmdDestSelect );
+ }
+ else if ( aButtonId == EAknSoftkeyOptions )
+ {
+ ProcessCommandL( EAknSoftkeyOptions );
+ }
+ else if ( aButtonId == EAknSoftkeyBack || aButtonId == EAknSoftkeyCancel )
+ {
+ result = ETrue;
+ }
+ else
+ {
+
+ }
+
+ return result;
}
// --------------------------------------------------------------------------
@@ -166,24 +188,20 @@
void CmPluginVpnNextLayerSelectDlg::SetTextsAndIconsL()
{
LOGGER_ENTERFN( "CmPluginVpnNextLayerSelectDlg::SetTextsAndIconsL" );
- // Title
- SetTitleL( *StringLoader::LoadLC(
- R_QTN_NETW_CONSET_PRMPT_VPN_REAL_CONNECTION ) );
- CleanupStack::PopAndDestroy(); // header
// Item text array
CDesCArray* itemArray =
new ( ELeave ) CDesCArrayFlat( KCmArrayMediumGranularity );
CleanupStack::PushL( itemArray );
- iMyListBox->Model()->SetItemTextArray( itemArray ); // ownership taken
- iMyListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
+ SetItemTextArray( itemArray ); // ownership taken
+ SetOwnershipType( ELbmOwnsItemArray );
CleanupStack::Pop( itemArray ); // as ownership is taken
// Icon array
CArrayPtr<CGulIcon>* icons =
new ( ELeave ) CArrayPtrFlat<CGulIcon>( KCmArrayMediumGranularity );
CleanupStack::PushL( icons );
- iMyListBox->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons );
+ SetIconArrayL( icons );
// ownership taken by SetIconArrayL!
CleanupStack::Pop( icons ); // as ownership is taken
@@ -383,7 +401,7 @@
{
aMenuPane->DeleteMenuItem( EAknCmdHelp );
}
- TUint32 highlighted = iDestinations[ iListBox->CurrentItemIndex() ];
+ TUint32 highlighted = iDestinations[ ListBox()->CurrentItemIndex() ];
switch ( highlighted )
{
@@ -423,8 +441,8 @@
break;
}
case ECmManagerUiCmdDestSelect:
- {
- TUint32 destId = iDestinations[ iListBox->CurrentItemIndex() ];
+ {
+ TUint32 destId = iDestinations[ ListBox()->CurrentItemIndex() ];
if ( destId != KDestItemUncategorized )
{
@@ -437,24 +455,44 @@
destId = iEasyWlanId;
}
iCmPluginBaseEng.SetIntAttributeL( attribute, destId );
- AttemptExitL( ETrue );
+
+ // We cannot use TryExitL here, since if the pointer event
+ // handling is ongoing, i.e., we got here from this class's
+ // HandleListBoxEventL, there will be a KERN-EXEC 3 panic.
+ // Calling base class HandleListBoxEventL will exit the
+ // dialog asynchronously with return value ETrue.
+ CAknListQueryDialog::HandleListBoxEventL( ListBox(),
+ EEventItemSingleClicked );
break;
}
+
// For uncategorised destinations, flow through to ECmManagerUiCmdCMSelect
}
case ECmManagerUiCmdCMSelect:
{
// select a connection method from the highlighted destination
- TUint32 destId = iDestinations[ iListBox->CurrentItemIndex() ];
+ TUint32 destId = iDestinations[ ListBox()->CurrentItemIndex() ];
TUint32 cmId (0);
if ( ShowCMSelectionDlgL( destId, cmId ) )
{
iCmPluginBaseEng.SetIntAttributeL( ECmNextLayerIapId, cmId );
- AttemptExitL( ETrue );
+
+ // We cannot use TryExitL here, since if the pointer event
+ // handling is ongoing, i.e., we got here from this class's
+ // HandleListBoxEventL, there will be a KERN-EXEC 3 panic.
+ // Calling base class HandleListBoxEventL will exit the
+ // dialog asynchronously with return value ETrue.
+ CAknListQueryDialog::HandleListBoxEventL( ListBox(),
+ EEventItemSingleClicked );
}
else
{
- CancelPopup();
+ // We need to exit asynchronously, in case we ended up here
+ // from HandleListBoxEventL. The callback function will exit
+ // the dialog with return value EFalse.
+ TCallBack cb( CancelAsynchronouslyL, this );
+ iAsyncCancel = new( ELeave ) CAsyncCallBack( cb, CActive::EPriorityHigh );
+ iAsyncCancel->CallBack();
}
break;
}
@@ -466,12 +504,12 @@
break;
case EAknSoftkeyBack:
{
- CancelPopup();
+ TryExitL( EAknSoftkeyBack );
break;
}
default:
{
- CAknPopupList::ProcessCommandL( aCommandId );
+ CAknListQueryDialog::ProcessCommandL( aCommandId );
break;
}
}
@@ -486,7 +524,7 @@
TEventCode aType )
{
TKeyResponse retVal ( EKeyWasNotConsumed );
- TUint highlighted = iDestinations[ iListBox->CurrentItemIndex() ];
+ TUint highlighted = iDestinations[ ListBox()->CurrentItemIndex() ];
switch ( aKeyEvent.iScanCode )
{
@@ -497,27 +535,27 @@
// change the soft key to 'Open'
if ( highlighted == KDestItemUncategorized )
{
- ButtonGroupContainer()->SetCommandL(
+ ButtonGroupContainer().SetCommandL(
ECmManagerUiCmdDestSelect,
*( StringLoader::LoadLC( R_QTN_MSK_OPEN ) )
);
- ButtonGroupContainer()->DrawDeferred();
+ ButtonGroupContainer().DrawDeferred();
CleanupStack::PopAndDestroy();
}
else
{
- ButtonGroupContainer()->SetCommandL(
+ ButtonGroupContainer().SetCommandL(
ECmManagerUiCmdDestSelect,
*( StringLoader::LoadLC( R_QTN_MSK_SELECT ) )
);
- ButtonGroupContainer()->DrawDeferred();
+ ButtonGroupContainer().DrawDeferred();
CleanupStack::PopAndDestroy();
}
break;
}
case EStdKeyNo:
{
- CancelPopup();
+ TryExitL( EAknSoftkeyCancel );
return EKeyWasConsumed;
}
default:
@@ -526,28 +564,29 @@
// change the soft key to 'Open'
if ( highlighted == KDestItemUncategorized )
{
- ButtonGroupContainer()->SetCommandL(
+ ButtonGroupContainer().SetCommandL(
ECmManagerUiCmdDestSelect,
*( StringLoader::LoadLC( R_QTN_MSK_OPEN ) )
);
- ButtonGroupContainer()->DrawDeferred();
+ ButtonGroupContainer().DrawDeferred();
CleanupStack::PopAndDestroy();
}
if ( aKeyEvent.iCode == EKeyEscape )
{
- CancelPopup();
+ TryExitL( EAknSoftkeyCancel );
return EKeyWasConsumed;
}
}
}
- retVal = iListBox->OfferKeyEventL( aKeyEvent, aType );
+ retVal = ListBox()->OfferKeyEventL( aKeyEvent, aType );
return retVal;
}
-
+
+
// ---------------------------------------------------------------------------
-// CDestDlg::HandleListBoxEventL
+// CmPluginVpnNextLayerSelectDlg::HandleListBoxEventL
// ---------------------------------------------------------------------------
void CmPluginVpnNextLayerSelectDlg::HandleListBoxEventL( CEikListBox* /*aListBox*/,
TListBoxEvent aEventType )
@@ -555,9 +594,10 @@
switch ( aEventType )
{
case EEventEnterKeyPressed:
- case EEventItemDoubleClicked:
+ case EEventItemSingleClicked:
{
- ProcessCommandL(ECmManagerUiCmdDestSelect);
+ ProcessCommandL( ECmManagerUiCmdDestSelect );
+
break;
}
default:
@@ -567,27 +607,6 @@
};
}
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::SetEmphasis
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::SetEmphasis( CCoeControl* aMenuControl,
- TBool aEmphasis )
- {
- CEikAppUi* appUi = iMyEikonEnv.EikAppUi();
- appUi->RemoveFromStack( aMenuControl );
-
- TRAP_IGNORE( appUi->AddToStackL (
- aMenuControl,
- aEmphasis ? ECoeStackPriorityDialog :
- ECoeStackPriorityMenu ) );
-
- appUi->UpdateStackedControlFlags(
- aMenuControl,
- aEmphasis ? 0 : ECoeStackFlagRefusesFocus,
- ECoeStackFlagRefusesFocus );
- appUi->HandleStackChanged();
- }
// --------------------------------------------------------------------------
// CmPluginVpnNextLayerSelectDlg::LoadResourceL
@@ -753,12 +772,9 @@
CleanupStack::PopAndDestroy();
CleanupStack::Pop( dlg );
- MakeVisible( EFalse );
-
TInt result = 0;
TRAPD( err, result = dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) );
- MakeVisible( ETrue );
User::LeaveIfError( err );
if ( result )
@@ -774,32 +790,6 @@
return retVal;
}
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::DisplayMenuL
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::DisplayMenuL()
- {
- iMenuBar->TryDisplayMenuBarL();
- }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::HideMenu
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::HideMenu()
- {
- iMenuBar->StopDisplayingMenuBar();
- }
-
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::MenuShowing
-// --------------------------------------------------------------------------
-//
-TBool CmPluginVpnNextLayerSelectDlg::MenuShowing() const
- {
- return iMenuBar->IsDisplayed();
- }
// --------------------------------------------------------------------------
// CmPluginVpnNextLayerSelectDlg::GetHelpContext
@@ -812,18 +802,3 @@
aContext.iContext = KSET_HLP_VPN_DEST_ASSOC_VIEW;
}
-// --------------------------------------------------------------------------
-// CmPluginVpnNextLayerSelectDlg::MakeVisible
-// --------------------------------------------------------------------------
-//
-void CmPluginVpnNextLayerSelectDlg::MakeVisible( TBool aVisible )
- {
- CAknPopupList::MakeVisible( aVisible );
-
- // Necessary implementation.
- CAknPopupList::FadeBehindPopup( IsVisible() );
- }
-
-
-
-
--- a/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.h Tue Jan 26 12:12:48 2010 +0200
+++ b/cmmanager/gsconnsettingsplugin/inc/gsconnsettingsplugin.h Tue Feb 02 00:24:11 2010 +0200
@@ -92,6 +92,11 @@
*/
void DoDeactivate();
+ /**
+ * See base class.
+ */
+ void HandleForegroundEventL( TBool aForeground );
+
/**
* From MEikMenuObserver.
--- a/cmmanager/gsconnsettingsplugin/loc/gsconnsettingsplugin.loc Tue Jan 26 12:12:48 2010 +0200
+++ b/cmmanager/gsconnsettingsplugin/loc/gsconnsettingsplugin.loc Tue Feb 02 00:24:11 2010 +0200
@@ -114,7 +114,7 @@
//w:
//r: 5.2
//
-#define qtn_occ_info_popup_wlan_usage_known "Known WLAN networks will be joined automatically."
+#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"
@@ -122,7 +122,7 @@
//w:
//r: 5.2
//
-#define qtn_occ_info_popup_wlan_usage_manual "Phone will not join WLAN networks automatically. WLAN network can be taken into use via WLAN wizard."
+#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
--- a/cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugin.cpp Tue Jan 26 12:12:48 2010 +0200
+++ b/cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugin.cpp Tue Feb 02 00:24:11 2010 +0200
@@ -194,13 +194,24 @@
//
void CGSConnSettingsPlugin::DoDeactivate()
{
- //Save current settings when we leave the view
+ CGSBaseView::DoDeactivate();
+ }
+
+// ---------------------------------------------------------------------------
+// CGSConnSettingsPlugin:: HandleForegroundEventL
+//
+//
+// ---------------------------------------------------------------------------
+//
+void CGSConnSettingsPlugin::HandleForegroundEventL( TBool aForeground )
+ {
+ //Load saved settings from Connection Settings API
//If function leaves it is trapped and ignored as there is nothing that we can do about it
- if ( iModel )
+ if ( iModel && aForeground )
{
- TRAP_IGNORE(iModel->SaveSettingsL());
- }
- CGSBaseView::DoDeactivate();
+ TRAP_IGNORE( iModel->LoadSettingsL() );
+ UpdateListBoxL( EGSSettIdDataUsageHomeNw );
+ }
}
// ----------------------------------------------------------------------------
@@ -373,7 +384,7 @@
void CGSConnSettingsPlugin::GetHelpContext( TCoeHelpContext& aContext )
{
aContext.iMajor = KUidGS;
- aContext.iContext = KCP_HLP_ADMINISTRATIVE_SETTINGS;
+ aContext.iContext = KHLP_OCC_CONN_SETTINGS;
}
// ---------------------------------------------------------------------------
@@ -466,6 +477,9 @@
{
iModel->SetUsageOfWlan( currentItem );
UpdateListBoxL( EGSSettIdUsageOfWlan );
+ //Save current settings when the setting is changed
+ //If function leaves it is trapped and ignored as there is nothing that we can do about it
+ TRAP_IGNORE(iModel->SaveSettingsL());
}
}
@@ -509,6 +523,9 @@
{
iModel->SetDataUsageAbroad( currentItem );
UpdateListBoxL( EGSSettIdDataUsageAbroad );
+ //Save current settings when the setting is changed
+ //If function leaves it is trapped and ignored as there is nothing that we can do about it
+ TRAP_IGNORE(iModel->SaveSettingsL());
}
}
CleanupStack::PopAndDestroy( items );
@@ -550,6 +567,9 @@
{
iModel->SetDataUsageInHomeNw( currentItem );
UpdateListBoxL( EGSSettIdDataUsageHomeNw );
+ //Save current settings when the setting is changed
+ //If function leaves it is trapped and ignored as there is nothing that we can do about it
+ TRAP_IGNORE(iModel->SaveSettingsL());
}
}
CleanupStack::PopAndDestroy( items );
--- a/cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugincontainer.cpp Tue Jan 26 12:12:48 2010 +0200
+++ b/cmmanager/gsconnsettingsplugin/src/gsconnsettingsplugincontainer.cpp Tue Feb 02 00:24:11 2010 +0200
@@ -449,7 +449,7 @@
void CGSConnSettingsPluginContainer::GetHelpContext( TCoeHelpContext& aContext ) const
{
aContext.iMajor = KUidGS;
-// aContext.iContext = KCP_HLP_DISPLAY;
+ aContext.iContext = KHLP_OCC_CONN_SETTINGS;
}
// ---------------------------------------------------------------------------
--- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiContainer.cpp Tue Jan 26 12:12:48 2010 +0200
+++ b/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiContainer.cpp Tue Feb 02 00:24:11 2010 +0200
@@ -272,7 +272,6 @@
void CConnectionMonitorUiContainer::OnTimerEventL()
{
iListBox->DrawNow();
- iListBox->UpdateScrollBarsL();
PushAndRefreshNaviPaneL();
}
--- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDetailsContainer.cpp Tue Jan 26 12:12:48 2010 +0200
+++ b/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDetailsContainer.cpp Tue Feb 02 00:24:11 2010 +0200
@@ -46,7 +46,7 @@
iListBox = new( ELeave ) CAknSingleHeadingStyleListBox;
iListBox->SetContainerWindowL( *this );
TInt flags = 0;
- flags |= EAknListBoxViewerFlags;
+ flags |= EAknListBoxViewerFlags | EAknListBoxDisableItemSpecificMenu;
iListBox->ConstructL( this, flags );
iListBox->CreateScrollBarFrameL( ETrue );
iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
--- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiView.cpp Tue Jan 26 12:12:48 2010 +0200
+++ b/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiView.cpp Tue Feb 02 00:24:11 2010 +0200
@@ -173,6 +173,13 @@
CEikMenuPane* aMenuPane )
{
MEikMenuObserver::DynInitMenuPaneL( aResourceId, aMenuPane );
+ // This is a security measure to prevent menu pane updates when
+ // the main view is not active. This should not happen but
+ // just to be safe it is checked.
+ if ( !iContainer )
+ {
+ return;
+ }
switch ( aResourceId )
{
case R_CONNECTIONMONITORUI_VIEW_MENU: