equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
25 #include <btengdevman.h> |
25 #include <btengdevman.h> |
26 #include <btengconnman.h> |
26 #include <btengconnman.h> |
27 #include <StringLoader.h> |
27 #include <StringLoader.h> |
28 #include <coemain.h> |
28 #include <coemain.h> |
29 #include <SysAp.rsg> |
29 #include <SysAp.rsg> |
|
30 #include <startupdomainpskeys.h> |
30 |
31 |
31 |
32 |
32 MSysApBtSapController* CreateSysApBtSapControllerL( CSysApAppUi& aSysApAppUi ) |
33 MSysApBtSapController* CreateSysApBtSapControllerL( CSysApAppUi& aSysApAppUi ) |
33 { |
34 { |
34 return CSysApBtSapController::NewL( aSysApAppUi ); |
35 return CSysApBtSapController::NewL( aSysApAppUi ); |
213 // ---------------------------------------------------------------------------- |
214 // ---------------------------------------------------------------------------- |
214 // CSysApBtSapController::HandlePropertyChangedL() |
215 // CSysApBtSapController::HandlePropertyChangedL() |
215 // ---------------------------------------------------------------------------- |
216 // ---------------------------------------------------------------------------- |
216 void CSysApBtSapController::HandlePropertyChangedL( const TUid& aCategory, const TUint aKey ) |
217 void CSysApBtSapController::HandlePropertyChangedL( const TUid& aCategory, const TUint aKey ) |
217 { |
218 { |
|
219 TInt simStatus = ESimStatusUninitialized; |
218 if ( aCategory == KPSUidBluetoothSapConnectionState && aKey == KBTSapConnectionState ) |
220 if ( aCategory == KPSUidBluetoothSapConnectionState && aKey == KBTSapConnectionState ) |
219 { |
221 { |
220 TInt value( 0 ); |
222 TInt value( 0 ); |
221 RProperty::Get( aCategory, aKey, value ); |
223 RProperty::Get( aCategory, aKey, value ); |
222 switch ( value ) |
224 switch ( value ) |
229 } |
231 } |
230 iBtSapEnabled = EFalse; |
232 iBtSapEnabled = EFalse; |
231 break; |
233 break; |
232 case EBTSapConnecting: |
234 case EBTSapConnecting: |
233 TRACES( RDebug::Print( _L("CSysApBtSapController::HandlePropertyChangedL: EBTSapConnecting, iBtSapEnabled=%d"), iBtSapEnabled ) ); |
235 TRACES( RDebug::Print( _L("CSysApBtSapController::HandlePropertyChangedL: EBTSapConnecting, iBtSapEnabled=%d"), iBtSapEnabled ) ); |
234 if ( !iBtSapEnabled ) |
236 //Ensure SIM is present |
|
237 simStatus = iSysApAppUi.StateOfProperty( KPSUidStartup, KPSSimStatus ); |
|
238 if ( !iBtSapEnabled && !(simStatus == ESimNotPresent || simStatus == ESimNotSupported)) |
235 { |
239 { |
236 iSysApAppUi.InitCloseSimApplicationsL(); |
240 iSysApAppUi.InitCloseSimApplicationsL(); |
237 } |
241 } |
238 break; |
242 break; |
239 case EBTSapConnected: |
243 case EBTSapConnected: |