coreapplicationuis/SysAp/Src/OfflineModeController/SysApOfflineModeControllerImpl.cpp
equal
deleted
inserted
replaced
52 // ---------------------------------------------------------------------------- |
52 // ---------------------------------------------------------------------------- |
53 void CSysApOfflineModeController::ConstructL() |
53 void CSysApOfflineModeController::ConstructL() |
54 { |
54 { |
55 TRACES( RDebug::Print( _L("CSysApOfflineModeController::ConstructL") ) ); |
55 TRACES( RDebug::Print( _L("CSysApOfflineModeController::ConstructL") ) ); |
56 // Check the active profile |
56 // Check the active profile |
57 TInt activeProfile( iSysApAppUi.ActiveProfileId() ); |
57 // TInt activeProfile( iSysApAppUi.ActiveProfileId() ); |
58 activeProfile = iSysApAppUi.ActiveProfileId(); |
58 // activeProfile = iSysApAppUi.ActiveProfileId(); |
59 if ( activeProfile == KOfflineModeProfileId ) |
59 // if ( activeProfile == KOfflineModeProfileId ) |
60 { |
60 { |
61 iOfflineModeActive = ETrue; |
61 iOfflineModeActive = ETrue; |
62 } |
62 } |
63 } |
63 } |
64 |
64 |
102 // Set state to starter. Note that if state is same as the current state, then nothing happens. |
102 // Set state to starter. Note that if state is same as the current state, then nothing happens. |
103 err = iSysApAppUi.SetStarterState(RStarterSession::EOffline); |
103 err = iSysApAppUi.SetStarterState(RStarterSession::EOffline); |
104 |
104 |
105 if ( err ) |
105 if ( err ) |
106 { |
106 { |
107 iSysApAppUi.RestoreProfileL( EFalse ); |
107 // iSysApAppUi.RestoreProfileL( EFalse ); |
108 iSysApAppUi.ShowUiNoteL( ECannotActivateOfflineModeNote ); |
108 iSysApAppUi.ShowUiNoteL( ECannotActivateOfflineModeNote ); |
109 } |
109 } |
110 else |
110 else |
111 { |
111 { |
112 iOfflineModeActive = ETrue; |
112 iOfflineModeActive = ETrue; |
142 err = iSysApAppUi.SetStarterState(RStarterSession::ENormal); |
142 err = iSysApAppUi.SetStarterState(RStarterSession::ENormal); |
143 } |
143 } |
144 |
144 |
145 if ( err ) |
145 if ( err ) |
146 { |
146 { |
147 iSysApAppUi.RestoreProfileL( ETrue ); |
147 // iSysApAppUi.RestoreProfileL( ETrue ); |
148 iSysApAppUi.ShowUiNoteL( ECannotDeactivateOfflineModeNote ); |
148 iSysApAppUi.ShowUiNoteL( ECannotDeactivateOfflineModeNote ); |
149 } |
149 } |
150 else |
150 else |
151 { |
151 { |
152 iOfflineModeActive = EFalse; |
152 iOfflineModeActive = EFalse; |
231 TBool err = EFalse; |
231 TBool err = EFalse; |
232 |
232 |
233 TInt btToBeActivated = iSysApAppUi.CenRepController().GetInt( KCRUidCoreApplicationUIsSysAp, |
233 TInt btToBeActivated = iSysApAppUi.CenRepController().GetInt( KCRUidCoreApplicationUIsSysAp, |
234 KSysApBtStatusBeforeOfflineMode, |
234 KSysApBtStatusBeforeOfflineMode, |
235 &err ); |
235 &err ); |
|
236 |
236 if ( err ) |
237 if ( err ) |
237 { |
238 { |
238 TRACES( RDebug::Print( _L("CSysApOfflineModeController::BtActiveBeforeOfflineMode: ERROR: %d" ), err ) ); |
239 TRACES( RDebug::Print( _L("CSysApOfflineModeController::BtActiveBeforeOfflineMode: ERROR: %d" ), err ) ); |
239 return EFalse; |
240 return EFalse; |
240 } |
241 } |
241 else |
242 else |
242 { |
243 { |
243 return ( TBool ) btToBeActivated; |
244 return ( TBool ) btToBeActivated; |
|
245 //return ETrue; |
244 } |
246 } |
245 |
247 |
246 } |
248 } |
247 |
249 |
248 // ---------------------------------------------------------------------------- |
250 // ---------------------------------------------------------------------------- |
251 TBool CSysApOfflineModeController::MustBtBeActivated() |
253 TBool CSysApOfflineModeController::MustBtBeActivated() |
252 { |
254 { |
253 return BtActiveBeforeOfflineMode(); |
255 return BtActiveBeforeOfflineMode(); |
254 } |
256 } |
255 |
257 |
|
258 |
256 // End of File |
259 // End of File |
257 |
260 |
258 |
261 |
259 |
262 |