equal
deleted
inserted
replaced
21 #include <QDebug> |
21 #include <QDebug> |
22 #include <QServiceManager> |
22 #include <QServiceManager> |
23 #include <QServiceFilter> |
23 #include <QServiceFilter> |
24 #include <QServiceInterfaceDescriptor> |
24 #include <QServiceInterfaceDescriptor> |
25 #include <QTimer> |
25 #include <QTimer> |
|
26 #ifdef Q_OS_SYMBIAN |
26 #include <XQSettingsManager> |
27 #include <XQSettingsManager> |
|
28 #include <screensaverdomaincrkeys.h> |
|
29 #endif //Q_OS_SYMBIAN |
27 #include <HbMainWindow> |
30 #include <HbMainWindow> |
28 #include <HbIndicatorInterface> |
31 #include <HbIndicatorInterface> |
|
32 #include <HbEffect> |
29 |
33 |
30 #include <screensaver.h> |
34 #include <screensaver.h> |
31 #include <screensaverdomaincrkeys.h> |
35 |
32 #include "snsrdevicedialog.h" |
36 #include "snsrdevicedialog.h" |
33 #include "snsrdevicedialogdisplaycontrol.h" |
37 #include "snsrdevicedialogdisplaycontrol.h" |
34 |
38 |
35 const char *gBigClockInterfaceName = "com.nokia.screensaver.ISnsrBigClockScreensaver"; |
39 const char *gBigClockInterfaceName = "com.nokia.screensaver.ISnsrBigClockScreensaver"; |
36 |
40 |
91 setBackgroundItem(0); |
95 setBackgroundItem(0); |
92 |
96 |
93 setDismissPolicy(HbPopup::NoDismiss); |
97 setDismissPolicy(HbPopup::NoDismiss); |
94 setTimeout(HbPopup::NoTimeout); |
98 setTimeout(HbPopup::NoTimeout); |
95 |
99 |
96 mainWindow()->setAutomaticOrientationEffectEnabled(false); |
100 // Disable all the effects for the screensaver dialog. Otherwise, the |
|
101 // automatic fade effect would be applied to the screensaver when screen |
|
102 // orientation changes, revealing the UI beneath (because device dialog |
|
103 // application server has a transparent background). This both looks ugly |
|
104 // and poses a potential security risk, as in the device locked case |
|
105 // screensaver is used as a layer to hide any confidential information. |
|
106 // Screensaver containers can still implement custom effects for orientation |
|
107 // swithc etc. |
|
108 HbEffect::disable(this); |
97 |
109 |
98 setDeviceDialogParameters( parameters ); |
110 setDeviceDialogParameters( parameters ); |
99 |
111 |
100 mDisplayControl = new SnsrDeviceDialogDisplayControl(); |
112 mDisplayControl = new SnsrDeviceDialogDisplayControl(); |
101 |
113 |
139 if ( !ok ) { |
151 if ( !ok ) { |
140 qWarning() << "SnsrDeviceDialog::setDeviceDialogParameters() - int cast failed"; |
152 qWarning() << "SnsrDeviceDialog::setDeviceDialogParameters() - int cast failed"; |
141 return false; |
153 return false; |
142 } |
154 } |
143 } |
155 } |
144 |
156 |
|
157 #ifdef Q_OS_SYMBIAN |
145 // Check initial view from repository |
158 // Check initial view from repository |
146 if (viewType == ViewTypeInitial ) { |
159 if (viewType == ViewTypeInitial ) { |
147 XQSettingsManager::Error error; |
160 XQSettingsManager::Error error; |
148 int startupView = 0; |
161 int startupView = 0; |
149 XQCentralRepositorySettingsKey settingsKey( |
162 XQCentralRepositorySettingsKey settingsKey( |
153 error = settingsManager.error(); |
166 error = settingsManager.error(); |
154 if (error == XQSettingsManager::NoError) { |
167 if (error == XQSettingsManager::NoError) { |
155 viewType = startupView; |
168 viewType = startupView; |
156 } |
169 } |
157 } |
170 } |
158 |
171 #else |
|
172 if (viewType == ViewTypeInitial ) { |
|
173 viewType = ViewTypeStandby; |
|
174 } |
|
175 #endif //Q_OS_SYMBIAN |
|
176 |
159 switch (viewType) { |
177 switch (viewType) { |
160 case SnsrDeviceDialog::ViewTypeActive: |
178 case SnsrDeviceDialog::ViewTypeActive: |
161 mScreensaver->foreground(); |
179 mScreensaver->foreground(); |
162 return true; |
180 return true; |
163 case SnsrDeviceDialog::ViewTypeStandby: |
181 case SnsrDeviceDialog::ViewTypeStandby: |