16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 // INCLUDE FILES |
19 // INCLUDE FILES |
20 |
20 |
21 #include "ConnectionDialogsNotifBase.h" |
21 #include <e32property.h> |
22 |
22 #include <ScreensaverInternalPSKeys.h> |
|
23 #include <coreapplicationuisdomainpskeys.h> |
23 #include <bautils.h> |
24 #include <bautils.h> |
24 #include <eikenv.h> |
25 #include <eikenv.h> |
25 #include <data_caging_path_literals.hrh> |
26 #include <data_caging_path_literals.hrh> |
26 |
27 |
|
28 #include "ConnectionDialogsLogger.h" |
|
29 #include "ConnectionDialogsNotifBase.h" |
|
30 |
|
31 #ifdef _DEBUG |
|
32 #include <e32debug.h> |
|
33 #endif |
27 |
34 |
28 // CONSTANTS |
35 // CONSTANTS |
29 |
36 |
30 // ROM folder |
37 // ROM folder |
31 _LIT( KDriveZ, "z:" ); |
38 _LIT( KDriveZ, "z:" ); |
86 // --------------------------------------------------------- |
93 // --------------------------------------------------------- |
87 // CConnectionDialogsNotifBase::CConnectionDialogsNotifBase() |
94 // CConnectionDialogsNotifBase::CConnectionDialogsNotifBase() |
88 // --------------------------------------------------------- |
95 // --------------------------------------------------------- |
89 // |
96 // |
90 CConnectionDialogsNotifBase::CConnectionDialogsNotifBase() |
97 CConnectionDialogsNotifBase::CConnectionDialogsNotifBase() |
91 : iReplySlot( 0 ), |
98 : iCancelled( EFalse ), |
92 iCancelled( EFalse ), |
|
93 iResource( 0 ) |
99 iResource( 0 ) |
94 { |
100 { |
95 iInfo.iUid = TUid::Null(); |
|
96 iInfo.iChannel = TUid::Null(); |
|
97 iInfo.iPriority = 0; |
|
98 } |
101 } |
99 |
102 |
100 |
103 |
101 // --------------------------------------------------------- |
104 // --------------------------------------------------------- |
102 // void CConnectionDialogsNotifBase::ConstructL() |
105 // void CConnectionDialogsNotifBase::ConstructL() |
132 { |
135 { |
133 CCoeEnv::Static()->DeleteResourceFile( iResource ); |
136 CCoeEnv::Static()->DeleteResourceFile( iResource ); |
134 } |
137 } |
135 } |
138 } |
136 |
139 |
|
140 // --------------------------------------------------------- |
|
141 // CConnectionDialogsNotifBase::ScreenSaverOn() |
|
142 // --------------------------------------------------------- |
|
143 // |
|
144 TBool CConnectionDialogsNotifBase::ScreenSaverOn() |
|
145 { |
|
146 TInt err( KErrNone ); |
|
147 TInt screenSaverOn( 0 ); |
|
148 |
|
149 // Cancel the dialog if screen saver is on. |
|
150 err = RProperty::Get( KPSUidScreenSaver, |
|
151 KScreenSaverOn, |
|
152 screenSaverOn ); |
|
153 |
|
154 return (err == KErrNone && screenSaverOn > 0); |
|
155 } |
|
156 |
|
157 // --------------------------------------------------------- |
|
158 // CConnectionDialogsNotifBase::AutolockOn() |
|
159 // --------------------------------------------------------- |
|
160 // |
|
161 TBool CConnectionDialogsNotifBase::AutolockOn() |
|
162 { |
|
163 TBool retval( EFalse ); |
|
164 |
|
165 CLOG_ENTERFN( "CConnectionDialogsNotifBase::AutolockOn" ); |
|
166 |
|
167 #ifdef RD_STARTUP_CHANGE |
|
168 TInt err( KErrNone ); |
|
169 TInt autolockOn( 0 ); |
|
170 // Cancel the dialog if screen saver is on. |
|
171 err = RProperty::Get( KPSUidCoreApplicationUIs, |
|
172 KCoreAppUIsAutolockStatus, |
|
173 autolockOn ); |
|
174 // In boot there may come EAutolockStatusUninitialized, when it should be EAutolockOn... |
|
175 retval = (err == KErrNone && autolockOn != EAutolockOff); |
|
176 |
|
177 #ifdef _DEBUG |
|
178 RDebug::Print( _L("CConnectionDialogsNotifBase::AutolockOn: autolockOn: %d"), autolockOn ); |
|
179 RDebug::Print( _L("CConnectionDialogsNotifBase::AutolockOn: err: %d"), err ); |
|
180 RDebug::Print( _L("CConnectionDialogsNotifBase::AutolockOn: %d"), retval ); |
|
181 #endif |
|
182 |
|
183 #endif // RD_STARTUP_CHANGE |
|
184 |
|
185 CLOG_LEAVEFN( "CConnectionDialogsNotifBase::AutolockOn" ); |
|
186 |
|
187 return retval; |
|
188 } |
137 |
189 |
138 |
190 |
139 // End of File |
191 // End of File |