diff options
author | Juha Kukkonen <ext-juha.kukkonen@nokia.com> | 2012-04-11 12:40:03 +0300 |
---|---|---|
committer | Juha Kukkonen <ext-juha.kukkonen@nokia.com> | 2012-04-12 11:20:58 +0300 |
commit | 40b25dd54ffaea2e25d470df89fd67591708973a (patch) | |
tree | 2dc3fdbc4ca124890f4e1e9d09121644fca65b48 /src | |
parent | 50eb18e607e48c260f609bf585d89d1b6b37aa83 (diff) |
Fix QSystemNetworkInfo crash on Symbian Belle FP 1
Creating QSystemNetworkInfo instance will panic the application if it
has WriteDeviceData but not ReadDeviceData capability due to changes
in underlaying platform.
Task-number: ou1cimx1#992693
Reviewed-by: Pasi Pentikainen
Diffstat (limited to 'src')
-rw-r--r-- | src/systeminfo/symbian/networkoperatornamelistener_s60.cpp | 18 | ||||
-rw-r--r-- | src/systeminfo/systeminfo.pro | 5 |
2 files changed, 22 insertions, 1 deletions
diff --git a/src/systeminfo/symbian/networkoperatornamelistener_s60.cpp b/src/systeminfo/symbian/networkoperatornamelistener_s60.cpp index af66a3867b..e6a2e80fbc 100644 --- a/src/systeminfo/symbian/networkoperatornamelistener_s60.cpp +++ b/src/systeminfo/symbian/networkoperatornamelistener_s60.cpp @@ -127,7 +127,23 @@ void CNetworkOperatorNameListener::ConstructL() <MNWMessageObserver::TNWMessages>( KAiMessageCacheGranularity ); //Create network handling engine session. Needs networkControl Caps - TRAP_IGNORE( iNWSession = CreateL( *this, iNWInfo ) ); + bool createSession = true; + +#ifdef SYMBIAN_BELLE_FP_1_OR_LATER + // In Belle FP 1 creating network handling engine session (CreateL) + // will panic the client if app has WriteDeviceData but not ReadDeviceData + // capability. + RThread thread; + if (thread.HasCapability(ECapabilityWriteDeviceData) && + !thread.HasCapability(ECapabilityReadDeviceData)) { + createSession = false; + } +#endif + + if (createSession) { + TRAP_IGNORE( iNWSession = CreateL( *this, iNWInfo ) ); + } + if (iNWSession == NULL ) { //Creation of session has failed due to lack of capabilities //All apps need NetworkControl caps to use this diff --git a/src/systeminfo/systeminfo.pro b/src/systeminfo/systeminfo.pro index 2de6a8536c..e8d4f8dec0 100644 --- a/src/systeminfo/systeminfo.pro +++ b/src/systeminfo/systeminfo.pro @@ -227,6 +227,11 @@ unix:!simulator { DEFINES += SYMBIAN_3_PLATFORM } + contains(S60_VERSION, 5.4) | contains(S60_VERSION, 5.5) { + message("Symbian Belle FP 1 or later defined") + DEFINES += SYMBIAN_BELLE_FP_1_OR_LATER + } + contains(LockandFlipPSkeys_enabled, yes) { message("LockandFlipPSKeys available") DEFINES += LOCKANDFLIP_SUPPORTED |