equal
deleted
inserted
replaced
17 * |
17 * |
18 */ |
18 */ |
19 |
19 |
20 |
20 |
21 // INCLUDE FILES |
21 // INCLUDE FILES |
|
22 #include <e32property.h> |
|
23 #include <ScreensaverInternalPSKeys.h> |
|
24 #include <coreapplicationuisdomainpskeys.h> |
22 #include "DisconnectDlgUi.h" |
25 #include "DisconnectDlgUi.h" |
23 #include "ActiveDisconnectDlgPlugin.h" |
26 #include "ActiveDisconnectDlgPlugin.h" |
24 #include "ConnectionModel.h" |
27 #include "ConnectionModel.h" |
25 #include "QueryDisconnectDlgDialog.h" |
28 #include "QueryDisconnectDlgDialog.h" |
26 #include "ConnectionDialogsUidDefs.h" |
29 #include "ConnectionDialogsUidDefs.h" |
249 TInt aReplySlot, |
252 TInt aReplySlot, |
250 const RMessagePtr2& aMessage ) |
253 const RMessagePtr2& aMessage ) |
251 { |
254 { |
252 CLOG_ENTERFN("CDisconnectDialogUi::StartL"); |
255 CLOG_ENTERFN("CDisconnectDialogUi::StartL"); |
253 |
256 |
|
257 TInt err( KErrNone ); |
|
258 TInt screenSaverOn( 0 ); |
|
259 |
|
260 // Cancel the dialog if screensaver is on. |
|
261 err = RProperty::Get( KPSUidScreenSaver, |
|
262 KScreenSaverOn, |
|
263 screenSaverOn ); |
|
264 |
|
265 TBool autolockOn( EFalse ); |
|
266 #ifdef RD_STARTUP_CHANGE |
|
267 TInt autolockStatus( 0 ); |
|
268 // Cancel the dialog if Autolock is on. |
|
269 err |= RProperty::Get( KPSUidCoreApplicationUIs, |
|
270 KCoreAppUIsAutolockStatus, |
|
271 autolockStatus ); |
|
272 autolockOn = autolockStatus > EAutolockOff; |
|
273 #endif |
|
274 |
|
275 if ( err == KErrNone && ( screenSaverOn > 0 || autolockOn ) ) |
|
276 { |
|
277 // Screen saver or Autolock is active. Cancel the dialog. |
|
278 aMessage.Complete( KErrCancel ); |
|
279 return; |
|
280 } |
|
281 |
254 iStarted = ETrue; |
282 iStarted = ETrue; |
255 |
283 |
256 TPckgBuf<TDisconnectConnectionPrefs> passedInfo; |
284 TPckgBuf<TDisconnectConnectionPrefs> passedInfo; |
257 passedInfo.Copy( aBuffer ); |
285 passedInfo.Copy( aBuffer ); |
258 iConnectionPrefs = passedInfo(); |
286 iConnectionPrefs = passedInfo(); |
260 iReplySlot = aReplySlot; |
288 iReplySlot = aReplySlot; |
261 iMessage = aMessage; |
289 iMessage = aMessage; |
262 |
290 |
263 CLOG_WRITEF(_L( "iCntPrefs.iPrompt: %d" ), iConnectionPrefs.iPrompt ); |
291 CLOG_WRITEF(_L( "iCntPrefs.iPrompt: %d" ), iConnectionPrefs.iPrompt ); |
264 |
292 |
265 TInt err( KErrNone ); |
293 err = KErrNone; |
266 TRAP( err, iActivePlugin = CActiveDisconnectDlgPlugin::NewL( this ) ); |
294 TRAP( err, iActivePlugin = CActiveDisconnectDlgPlugin::NewL( this ) ); |
267 |
295 |
268 if ( err ) |
296 if ( err ) |
269 { |
297 { |
270 delete iActivePlugin; |
298 delete iActivePlugin; |