diff -r 923ff622b8b9 -r 4633027730f5 src/hbcore/utils/hbdeviceprofile.cpp --- a/src/hbcore/utils/hbdeviceprofile.cpp Tue Jul 06 14:36:53 2010 +0300 +++ b/src/hbcore/utils/hbdeviceprofile.cpp Wed Aug 18 10:05:37 2010 +0300 @@ -29,10 +29,12 @@ #include "hbmemorymanager_p.h" #include "hbtheme_p.h" #include "hbthemeclient_p.h" -#include +#include "hbmainwindow.h" #include "hbmainwindow_p.h" -#include +#ifdef Q_OS_SYMBIAN +#include "hbthemecommon_symbian_p.h" +#endif // To store the pointer to the deviceProfiles at the client side. static HbDeviceProfileList *deviceProfilesList = 0; @@ -299,19 +301,28 @@ HbDeviceProfileList *HbDeviceProfilePrivate::deviceProfiles() { - if (!deviceProfilesList) { + // HbOrientationStatus may call this from the Theme Server process + // too and this needs special support. + bool isThemeServer = false; +#ifdef Q_OS_SYMBIAN + RProcess process; + isThemeServer = process.SecureId().iId == KServerUid3.iUid; + process.Close(); +#endif + if (!deviceProfilesList && !isThemeServer) { // Will result in IPC call. gets the shared memory offset from themeserver. deviceProfilesList = HbThemeClient::global()->deviceProfiles(); } if (!deviceProfilesList) { + HbMemoryManager::MemoryType memType = isThemeServer + ? HbMemoryManager::SharedMemory : HbMemoryManager::HeapMemory; // This is fall back.Create/Get the HbDeviceProfileDatabase Instance at // the client side and read the deviceProfilesList. HbDeviceProfileDatabase *deviceProfileDataBase = - HbDeviceProfileDatabase::instance(HbMemoryManager::HeapMemory); - deviceProfilesList = HbMemoryUtils::getAddress(HbMemoryManager::HeapMemory, + HbDeviceProfileDatabase::instance(memType); + deviceProfilesList = HbMemoryUtils::getAddress(memType, deviceProfileDataBase->deviceProfilesOffset()); } return deviceProfilesList; } -// end of file